docs: static public Throwable findCause(Throwable throwable) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.entry(tc, "findCause: " + throwable);
  
          Throwable cause = throwable.getCause();
  
          if (cause == null && throwable instanceof EJBException)
              cause = ((EJBException) throwable).getCausedByException();
  
          if (cause != null) {
              // --------------------------------------------------------------------
              // If the cause happens to be a WebSphere specific subclass of
              // EJBException or RemoteException, then convert it to a plain
              // EJBException or unwrap it, and continue looking for a
              // non-internal WebSphere specific exception.
              // --------------------------------------------------------------------
              String causeMessage = null;
              while (cause instanceof ContainerException ||
                     cause instanceof UncheckedException ||
                     cause instanceof EJSPersistenceException ||
                     cause instanceof CPIException ||
                     cause instanceof CPMIException ||
                     cause instanceof CSIException ||
                     cause instanceof InjectionException || // d436080
                     (cause instanceof EJBException &&
                      cause instanceof WsNestedException)) {
                  Throwable nextCause = cause.getCause();
                  if (nextCause == null) {
                      // Nothing was nested in the WebSphere specific exception,
                      // so convert to EJBException, copying the message and stack.
                      StackTraceElement[] stackTrace = cause.getStackTrace();
                      if (causeMessage == null) {
                          causeMessage = cause.getMessage();
                      }
                      cause = new EJBException(causeMessage);
                      cause.setStackTrace(stackTrace);
                  } else {
                      if (cause instanceof InjectionException) {
                          causeMessage = cause.getMessage();
                      }
                      cause = nextCause;
                  }
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "findCause: " + cause);
  
          return cause;
      }