简体   繁体   中英

Determining cause for failed remote EJB invocation

I recently successfully migrated j-lawyer.org 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

I do NOT have any issue with EJB remote invocations in general - everything is working fine.

Just 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 eg EJBAccessExceptions when credentials were wrong, so you could figure out what went wrong.

Any ideas?

Thanks, Jens

have you updated the client code accordingly, in order to make sure, JNDI entries and stub code, is compatible with your new server? See some related questions and check the specific code. Here , or here and last but not least check the official Jboss (Wildfly) page in the remote EJB invocation here , there is also a wildfly specific API you could use.

Hope that helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM