I have an application odon.ear inside, and I have an EJB app (odonEJB.jar) and Web app (odonWeb.war). When I invoke the ejb from odonWeb.war, I do not have any problem
(using <naming:ejb-link> in the geronimo-application for the web module). Everything works fine.
My problem happens when another ear (odonsecond.ear) that has one Web module odonWeb2.war. When it tries to call the ejb in the odon.ear, it can not find the object both reside in the same application server.
Here is the exception
Caused by: java.rmi.NoSuchObjectException: geronimo.server:J2EEApplication=com/nsele/odonprocess,J2EEModule=odonEJB.jar,J2EEServer=geronimo,j2eeType=StatelessSessionBean,name=OdonProcessExecuteFace
at org.openejb.proxy.EJBMethodInterceptor.createEJBInvocation(EJBMethodI
nterceptor.java:171)
at org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor
.java:115)
at org.openejb.proxy.SessionEJBHome$$EnhancerByCGLIB$$1b53ab89.create(<g
enerated>)
my web.xml in odonsecond.war referring to ejb
<ejb-ref>
<ejb-ref-name>ejb/com/nsele/execution/ejb/OdonProcessExecuteHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.nsele.execute.ejb.OdonProcessExecuteHome</home>
<remote>com.nsele.execute.ejb.OdonProcessExecute</remote>
</ejb-ref>
geronimo-application.xml
<naming:ejb-ref>
<naming:ref-name>ejb/com/nsele/execution/ejb/OdonProcessExecuteHome</naming:ref-name>
<naming:target-name>geronimo.server:J2EEApplication=com/nsele/odonprocess,J2EEModule=odonEJB.jar,J2EEServer=geronimo,j2eeType=StatelessSessionBean,name= OdonProcessExecuteFace </naming:target-name>
</naming:ejb-ref>