Get IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling, but only when interface is in separate jar from ejb
jcrisp Feb 10, 2014 6:12 PMI've got a remote stateless ejb that is deployed (as an .ear) to a server group on a domain environment (EAP 6.2 / Java 7) .
myapp.ear |---- META-INF | | | |---- application.xml | |---- MANAFEST.MF
| |
|
A different server group on the same domain has a Web Service (deployed as a .war) that contains the code that invokes the remote ejb.
mywar.war
|---- META-INF
| |
| |---- jboss-ejb-client.xml
| |---- MANAFEST.MF
|
|---- WEB-INF
| |
| |---- classes
| |---- lib
| | |---- myejb.jar // Not sure this is needed since I am calling it with an interface
| | |----core.jar // Contains interface, business logic and pojos
| web.xml
If I move the interface, pojos and business logic into the same jar as the ejb then remote method invocation works as advertised. Once I move them into a core jar then I get the EJBCLIENT000025 error.
15:46:04,999 ERROR [org.jboss.as.webservices.invocation.InvocationHandlerJAXWS] (http-/10.1.1.92:8080-1) JBAS015594: Method invocation failed with exception: java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:myapp, moduleName:myejb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@39bcda65: java.lang.RuntimeException: java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:myapp, moduleName:myejb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@39bcda65
at com.idtdna.invoker.Invoker.invokeOnBean(Invoker.java:74) [classes:]
at com.idtdna.invoker.MyWebService.runInvoker(MyWebService.java:34) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
The code is based on the example here: https://docs.jboss.org/author/display/AS72/EJB+invocations+from+a+remote+server+instance
with the addition of props.put("jboss.naming.client.ejb.context", true); This appears to be needed when the destination is not localhost.
Any suggestions?
Thanks!