0

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

Any ideas?

Thanks, Jens

Sevan
  • 669
  • 1
  • 5
  • 18
j-dimension
  • 119
  • 10

1 Answers1

0

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!

Community
  • 1
  • 1
javapapo
  • 1,342
  • 14
  • 26
  • Thanks for the reply. I might have been too "inaccurate" - I have no issues at all with migrating the client. I just want to distinguish between connection issues and authentication / authorization issues to provide better error messages to the end user. I updated my question to make this more clear. – j-dimension Jan 04 '16 at 20:25