Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-16754

[GSS](7.2.z) @EJB(name=...) fails to start when more than one EJB implements the same interface

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Explained
    • Affects Version/s: 7.2.0.GA
    • Fix Version/s: None
    • Component/s: EJB
    • Labels:
      None
    • Target Release:
    • Steps to Reproduce:
      Hide

      Deploy JBEAP-16754.jar and start JBoss

      Show
      Deploy JBEAP-16754 .jar and start JBoss

      Description

      @EJB(name=...) fails to start when more than one EJB implements the same interface

      00:56:49,249 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."jbeap.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."jbeap.jar".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "jbeap.jar"
      	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:151)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
      	at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0052: Failed to install component MyTestSingleton
      	at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:109)
      	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:144)
      	... 8 more
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0408: More than one EJB found with interface of type 'reproducer.MyLocal' for binding SLSB1. Found: [View of type reproducer.MyLocal for org.jboss.as.ejb3.component.stateless.StatelessComponentDescription{serviceName=service jboss.deployment.unit."jbeap.jar".component.SLSB2}@1347b10e, View of type reproducer.MyLocal for org.jboss.as.ejb3.component.stateless.StatelessComponentDescription{serviceName=service jboss.deployment.unit."jbeap.jar".component.SLSB1}@40fc693f]
      	at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:90)
      	at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.processBindings(ComponentInstallProcessor.java:263)
      	at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.access$000(ComponentInstallProcessor.java:80)
      	at org.jboss.as.ee.component.deployers.ComponentInstallProcessor$1.handle(ComponentInstallProcessor.java:215)
      	at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
      	at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:218)
      	at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:101)
      	... 9 more
      
      @javax.ejb.Stateless(name="SLSB1")
      public class MyStateless1 implements MyLocal {
      ...
      }
      
      @javax.ejb.Stateless(name="SLSB2")
      public class MyStateless2 implements MyLocal {
      ...
      }
      
      @javax.ejb.Startup
      @javax.ejb.Singleton
      public class MyTestSingleton {  
        @javax.ejb.EJB(name="SLSB1")
        private MyLocal myStateless1;
      
        @javax.ejb.EJB(name="SLSB2")
        private MyLocal myStateless2;
      }
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  soul2zimate Chao Wang
                  Reporter:
                  bmaxwell Brad Maxwell
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: