EJB bean is not found during deployement
samwun9988 Sep 18, 2011 1:42 AMTrying to deploy an application that consists of a EAR/WAR/EJB module all separate. In the WAR a reference to the EJB3 SLSB is done like this:
<ejb-local-ref>
<ejb-ref-name>ejb/CategoryManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>ix.houseware.category.CategoryManager</local>
<ejb-link>CategoryManager</ejb-link>
</ejb-local-ref>
During deployment, JBOSS AS7 throws the following exception:
15:32:37,056 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Starting deployment of "CategoryClient-ear.ear"
15:32:37,343 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "CategoryClient-ejb-1.0-SNAPSHOT.jar"
15:32:37,343 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "CategoryClient-web.war"
15:32:38,041 INFO [org.jboss.as.jpa] (MSC service thread 1-2) added javax.persistence.api dependency to CategoryClient-ear.ear
15:32:38,042 INFO [org.jboss.as.jpa] (MSC service thread 1-3) added javax.persistence.api dependency to CategoryClient-web.war
15:32:38,042 INFO [org.jboss.as.jpa] (MSC service thread 1-7) added javax.persistence.api dependency to CategoryClient-ejb-1.0-SNAPSHOT.jar
15:32:38,056 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named CategoryManagerImpl in deployment unit subdeployment "CategoryClient-ejb-1.0-SNAPSHOT.jar" of deployment "CategoryClient-ear.ear" are as follows:
java:global/CategoryClient-ear/CategoryClient-ejb-1.0-SNAPSHOT/CategoryManagerImpl!ix.houseware.category.CategoryManager
java:app/CategoryClient-ejb-1.0-SNAPSHOT/CategoryManagerImpl!ix.houseware.category.CategoryManager
java:module/CategoryManagerImpl!ix.houseware.category.CategoryManager
java:global/CategoryClient-ear/CategoryClient-ejb-1.0-SNAPSHOT/CategoryManagerImpl
java:app/CategoryClient-ejb-1.0-SNAPSHOT/CategoryManagerImpl
java:module/CategoryManagerImpl
15:32:38,118 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.subunit."CategoryClient-ear.ear"."CategoryClient-web.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."CategoryClient-ear.ear"."CategoryClient-web.war".INSTALL: Failed to process phase INSTALL of subdeployment "CategoryClient-web.war" of deployment "CategoryClient-ear.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
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$Worker.runTask(ThreadPoolExecutor.java:885) [:1.6.0_03-p4]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [:1.6.0_03-p4]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_03-p4]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: No component found for type 'ix.houseware.category.CategoryManager' with name CategoryManager
at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:68)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:200)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:99)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
... 5 more
15:32:38,323 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "CategoryClient-ear.ear" was rolled back with failure message {"Failed services" => {"jboss.deployment.subunit.\"CategoryClient-ear.ear\".\"CategoryClient-web.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"CategoryClient-ear.ear\".\"CategoryClient-web.war\".INSTALL: Failed to process phase INSTALL of subdeployment \"CategoryClient-web.war\" of deployment \"CategoryClient-ear.ear\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.CategoryClient-ear.CategoryClient-web.ValidatorFactory missing [ jboss.naming.context.java.module.CategoryClient-ear.CategoryClient-web ]","jboss.naming.context.java.module.CategoryClient-ear.CategoryClient-web.Validator missing [ jboss.naming.context.java.module.CategoryClient-ear.CategoryClient-web ]"]}
15:32:38,331 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment CategoryClient-ejb-1.0-SNAPSHOT.jar in 8ms
15:32:38,337 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Stopped deployment CategoryClient-web.war in 14ms
15:32:38,340 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Stopped deployment CategoryClient-ear.ear in 17ms
15:32:38,341 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.subunit.\"CategoryClient-ear.ear\".\"CategoryClient-web.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"CategoryClient-ear.ear\".\"CategoryClient-web.war\".INSTALL: Failed to process phase INSTALL of subdeployment \"CategoryClient-web.war\" of deployment \"CategoryClient-ear.ear\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.CategoryClient-ear.CategoryClient-web.ValidatorFactory missing [ jboss.naming.context.java.module.CategoryClient-ear.CategoryClient-web ]","jboss.naming.context.java.module.CategoryClient-ear.CategoryClient-web.Validator missing [ jboss.naming.context.java.module.CategoryClient-ear.CategoryClient-web ]"]}}}
Any suggestion would be very appreciated.
Thanks
Sam