1 Reply Latest reply on Oct 23, 2013 12:00 PM by Alessio Soldano

    DuplicateServiceException despite context-root in application.xml in Wildfly SNAPSHOT

    Will Reichert Newbie

      We are trying to test a benchmark application on a local build of wildfly-8.0.0.Beta2-SNAPSHOT but the application fails to deploy with the following exception:

       

      2013-10-17 10:32:59,266 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.subunit."specj.ear"."specj.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."specj.ear"."specj.jar".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "specj.jar" of deployment "specj.ear"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Beta2-SNAPSHOT.jar:8.0.0.Beta2-SNAPSHOT]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1944) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1877) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
        at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
      Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.concurrent.ee.context.config.specj.specj is already registered
        at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
        at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:235) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
        at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:767) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
        at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
        at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2384) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
        at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
        at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2384) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
        at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:317) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
        at org.jboss.as.ee.concurrent.deployers.EEConcurrentContextProcessor.setupConcurrentContext(EEConcurrentContextProcessor.java:110)
        at org.jboss.as.ee.concurrent.deployers.EEConcurrentContextProcessor.processModuleDescription(EEConcurrentContextProcessor.java:71)
        at org.jboss.as.ee.concurrent.deployers.EEConcurrentContextProcessor.deploy(EEConcurrentContextProcessor.java:54)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Beta2-SNAPSHOT.jar:8.0.0.Beta2-SNAPSHOT]
        ... 5 more
      
      
      2013-10-17 10:32:59,283 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-3) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "specj.ear")]) - failure description: {
          "JBAS014671: Failed services" => {"jboss.deployment.subunit.\"specj.ear\".\"specj.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"specj.ear\".\"specj.jar\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment \"specj.jar\" of deployment \"specj.ear\"
          Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.concurrent.ee.context.config.specj.specj is already registered"},
          "JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"specj.ear\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"specj.ear\".beanmanager]"]
      }
      

       

       

       

      The ear has a war and jar that share a file name but a web context-root is defined in applicaiton.xml. The context-root was the workaround from AS7 WebService endpoint and WAR module causes DuplicateServiceException but it does not appear to work with the latest in Wildly

       

      application.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <application xmlns="http://java.sun.com/xml/ns/javaee"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   version="5"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
            <description>SPECjEnterprise</description>
      
      
            <module>
               <web>
                  <web-uri>supplier.war</web-uri>
                  <context-root>supplier</context-root>
               </web>
            </module>
      
      
            <module>
              <web>
                      <web-uri>specj.war</web-uri>
                      <context-root>specj-web</context-root>
              </web>
            </module>
      
      
            <module>
               <ejb>specj.jar</ejb>
            </module>
         </application>