DeploymentUnitProcessingException: More than 1 component found for type ... and bean name ... for binding ... in JBoss EAP 6
Issue
- I'm experiencing this error while deploying below, which looks similar to https://community.jboss.org/message/717249
INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-4) JNDI bindings for session bean named HelloServiceImpl in deployment unit subdeployment "example-ejb.jar" of deployment "example.ear" are as follows:
java:global/examples/example-ejb/HelloServiceImpl!com.jboss.examples.ejb.HelloLocal
java:app/bookline-server/HelloServiceImpl!com.jboss.examples.ejb.HelloLocal
java:module/HelloServiceImpl!com.jboss.examples.ejb.HelloLocal
java:global/examples/example-ejb/HelloServiceImpl
java:app/example-ejb/HelloServiceImpl
java:module/HelloServiceImpl
...
INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-4) JNDI bindings for session bean named HelloEndpointImpl in deployment unit subdeployment "example-ejb.jar" of deployment "example.ear" are as follows:
java:global/examples/example-ejb/HelloEndpointImpl!com.jboss.examples.ejb.HelloLocal
java:app/example-ejb/HelloEndpointImpl!com.jboss.examples.ejb.HelloLocal
java:module/HelloEndpointImpl!com.jboss.examples.ejb.HelloLocal
java:jboss/exported/examples/example-ejb/HelloEndpointImpl!com.jboss.examples.ejb.HelloLocal
...
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.subunit."example.ear"."example-ejb.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."example.ear"."example-ejb.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "example-ejb.jar" of deployment "example.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
...
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011058: Failed to install component ExampleImpl
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:101)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: More than 1 component found for type 'com.jboss.examples.ejb.HelloLocal' and bean name null for binding com.jboss.examples.ejb.ExampleWS/helloLocal
at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:88)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.processBindings(ComponentInstallProcessor.java:250)
...
The ExampleImpl code looks like this:
@Stateless
@Remote(ExampleRemote.class)
public class ExampleWS {
@EJB
HelloLocal helloLocal;
...
}
Environment
- JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.