EJB 2.0 on JBoss AS 7.1CR1
lsantha Jan 2, 2012 11:01 PMI'm trying to port an old Java EE application to JBoss AS 7.1 and I get the following problem.
I have two EJB jars: idgenerator and locking-server. A CMP entity bean in locking-server refers to a session bean in idgenerator. When I try to deploy locking-server I get the following error:
18:42:16,220 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."locking-server.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."locking-server.jar".INSTALL: Failed to process phase INSTALL of deployment "locking-server.jar"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as- server-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.7.0_01]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.7.0_01]
at java.lang.Thread.run(Thread.java:722) [:1.7.0_01]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011058: Failed to install component Locking
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:95)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.CR1b.jar:7.1.0.CR1b]
... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014544: No EJB found with interface of type 'norics.standard.server.IDGeneratorSessionHome' for binding java:comp/env/ejb/IDGeneratorSession
at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:85)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.processBindings(ComponentInstallProcessor.java:240)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:184)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:93)
... 6 more
Earlier in the log I have:
JNDI bindings for session bean named IDGeneratorSession in deployment unit deployment "idgenerator.jar" are as follows: ... java:global/idgenerator/IDGeneratorSession!norics.standard.server.IDGeneratorSessionHome java:app/idgenerator/IDGeneratorSession!norics.standard.server.IDGeneratorSessionHome java:module/IDGeneratorSession!norics.standard.server.IDGeneratorSessionHome
If I comment out the ejb-refrence in locking-server ejb-jar.xml the deployment succeeds. If I change the source code of locking-server to lookup the name java:global/idgenerator/IDGeneratorSession!norics.standard.server.IDGeneratorSessionHome then the code does work.
Is there a solution to avoid these extra steps like removing the excplicit remote EJB refernces from the EJB 2.0 deployment descriptors and changing the code to lookup the non-local EJBs under the new global namespace?
Is it possible to make the idgenerator session bean available under the namespace used by EJB 2.0: java:comp/env/ejb/IDGeneratorSession ?
Otherwise the porting would involve too many changes in the code.
Thank you, Levente