1 Reply Latest reply on Dec 19, 2011 3:28 PM by Will Reichert

    Starting EAR causes org.jboss.msc.service.DuplicateServiceException

    Will Reichert Newbie

      I am attempting to deploy the SpecJEnterprise ear on a new build of the 7.1 master (built from source) and am encountering the following exception stack

       

      12:31:35,178 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.subunit."specj.ear"."specj.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."specj.ear"."specj.jar".INSTALL: Failed to process phase INSTALL of subdeployment "specj.jar" of deployment "specj.ear"
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.CR1-SNAPSHOT.jar:]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.7.0_b147-icedtea]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.7.0_b147-icedtea]
                at java.lang.Thread.run(Thread.java:722) [:1.7.0_b147-icedtea]
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to add JBoss web deployment service
                at org.jboss.as.web.deployment.WarDeploymentProcessor.processDeployment(WarDeploymentProcessor.java:269)
                at org.jboss.as.web.deployment.WarDeploymentProcessor.deploy(WarDeploymentProcessor.java:104)
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.CR1-SNAPSHOT.jar:]
                ... 5 more
      Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.web.deployment.default-host./specj.realm is already registered
                at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154) [jboss-msc-1.0.1.GA.jar:]
                at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:226) [jboss-msc-1.0.1.GA.jar:]
                at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560) [jboss-msc-1.0.1.GA.jar:]
                at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.1.GA.jar:]
                at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2211) [jboss-msc-1.0.1.GA.jar:]
                at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.1.GA.jar:]
                at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2211) [jboss-msc-1.0.1.GA.jar:]
                at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.1.GA.jar:]
                at org.jboss.as.web.deployment.WarDeploymentProcessor.processDeployment(WarDeploymentProcessor.java:224)
                ... 7 more
      

       

      Specj.ear contains the following files:

      jar -tf specj.ear 
      META-INF/
      META-INF/MANIFEST.MF
      specj.war
      supplier.war
      specj.jar
      META-INF/application.xml
      lib/
      lib/generated-ws-buyer.jar
      

       

      I am guessing the issue is that both the war and jar have the same name and so they are mapping to the same realm because of the name that is found in the DSException however that is a guess .  I ran a quick test where I renamed specj.jar to just spec.jar and the application was able to deploy and start without encountering the DSException. I believe this might be a regression as it worked for previous build of 7.1 and for previous JBoss versions but I would like to get a discussion if others disagree