0 Replies Latest reply on Dec 22, 2015 4:42 PM by j-lawyer.org

    Determining cause for failed remote EJB invocation

    j-lawyer.org

      Hi,

       

      I recently migrated from JBoss 6 to Wildfly 9.0.2 and have the following question:

       

      I am using a Swing application that accesses remote EJBs (with security enabled). When launching the application, the user has an option to specify server and port as well as provide credentials.

       

      Question: How to distinguish between connection issues (wrong server or port) and authentication issues (wrong credentials)?

       

      In case of any failure, all I am getting is

       

      java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:j-lawyer-server, moduleName:j-lawyer-server-ejb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@10a4ea27

       

      To provide meaningful error messages to the end user, I would like to find out the root cause for the failed connection. #getCause doesn't help (is IllegalStateException again), and parsing the stacktrace might not be stable and "break" with the next Wildfly release. With JBoss 6, there were e.g. EJBAccessExceptions when credentials were wrong, so you could figure out what went wrong.

       

      Any ideas?

       

      Thanks,

      Jens