java.lang.IllegalStateException: No EJB receiver available for handling
mattforshaw Oct 17, 2012 12:29 PMHi all,
I'm running into a few issues getting remote EJB invocation working between two JBoss 7.1.1 instances.
I have created two fresh installations of JBoss, and followed the instructions at https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance yet I encounter the following error...
17:07:42,538 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/example].[jsp]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet jsp threw exception: java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:service,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@19c33aa
at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at $Proxy21.createUser(Unknown Source) at org.apache.jsp.index_jsp._jspService(index_jsp.java:75)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.13.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.13.Final.jar:]
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.13.Final.jar:]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.13.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_35]
Turning up the logging level does not give any further information related to this issue.
I am running both instances from standalone-full.xml, one with a port offset of 100. My arguments on startup are as follows.
sh bin/standalone.sh -server-config=standalone-full.xml -Djboss.node.name=one
sh bin/standalone.sh -server-config=standalone-full.xml -Djboss.socket.binding.port-offset=100 -Djboss.node.name=two
(Edit: To clarify, I have two distinct jboss directories.)
A number of threads suggest adding jndiProperties.put("jboss.naming.client.ejb.context", true); which I have tried to no avail.
I have also, while I don't think this should be necessary, tried to deploy within an ear to see if that helps, again to no avail.
In an attempt to simplify matters I tried to remove JBoss security for ejb calls by removing the security-realm in my standalone-full.xml file but this did not make any difference.
Interestingly, the ejb-remote quickstart runs successfully when running the client inside maven, yet I still encounter issues calling the remote methods from my JSP.
I have attached copies of my code (at the moment very simple test to get things off the ground). If there's anything else that would be helpful to know, don't hesitate to get in touch.
Any help in the matter would be much appreciated!
All the best,
Matt
Edit: I have tested on two machines (one Linux and the other OS X Mountain Lion), with the same result on both.
Message was edited by: Matt Forshaw
-
Archive.zip 114.6 KB