4 Replies Latest reply on Feb 25, 2012 6:47 AM by Marino Costa

    Trouble with remote EJB invocation from one server to another

    Marino Costa Newbie

      Good day all

       

      I'm trying to call a remote ejb deployed in a Jboss AS7.1 from another one with a simple web application with no success at all. I've followed the steps in the doc https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance, but it doesn't work at all.

       

      I can see the file 'jboss-ejb-client.xml' is read by the container, when the Jboss with the EJB is not running, the deployment crushes; if I stop the webapp container, the other one complains about it, so it seems they are communicating.

       

      The exception is as follows:

       

      19:32:08,066 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/prueba].[default]] (http--127.0.0.1-8080-1) Servlet.service() para servlet default lanzó excepción: java.lang.RuntimeException: java.lang.IllegalArgumentException: Could not find module app: pruebaEJBEar module: pruebaEJBJar distinct name:

                at com.prueba.bean.TestBean.invokeOnBean(TestBean.java:50) [classes:]

                at com.prueba.filter.TestFilter.doFilter(TestFilter.java:17) [classes:]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.10.Final.jar:]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final.jar:]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final.jar:]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]

                at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_16]

      Caused by: java.lang.IllegalArgumentException: Could not find module app: pruebaEJBEar module: pruebaEJBJar distinct name:

                at org.jboss.as.ejb3.remote.LocalEjbReceiver.findBean(LocalEjbReceiver.java:274) [jboss-as-ejb3-7.1.0.Final.jar:7.1.0.Final]

                at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:109) [jboss-as-ejb3-7.1.0.Final.jar:7.1.0.Final]

                at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:173) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]

                at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]

                at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:175) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]

                at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:92) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]

                at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:175) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]

                at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]

                at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]

                at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]

                at $Proxy13.greet(Unknown Source)          at com.prueba.bean.TestBean.invokeOnBean(TestBean.java:45) [classes:]

                ... 14 more

       

      As I stated before, my configuration is exactly the one from the sample. I'm running Windows 7 64bit in my computer, firewalls are deactivated. If I configure a single Jboss to target himself for remoting (port 4447), the sample works perfectly, the problem is when I try with two different containers.

       

      I'd appreciate if someone can help .