6 Replies Latest reply on Nov 30, 2017 5:44 AM by Fabi Yo

    WELD-000163 when I upgraded from WildFly 10.0.0 to 10.1.0

    Xavier Dury Newbie

      Hi,

       

      I tried upgrading from WildFly 10.0.0 to 10.1.0 and got the following error:

       

      15:16:51,508 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."my-app.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."my-app.war".WeldStartService: Failed to start service

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000163: Non-unique bean deployment identifier detected:

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-jpa-module-api-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=/d:/development/git/my-project/content/my-app.war/WEB-INF/lib/rewrite-config-prettyfaces-3.4.1.Final.jar],

        - BeanDeployment [beanDeploymentArchiveId=/d:/development/git/my-project/content/my-app.war/WEB-INF/lib/deltaspike-data-module-api-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=javax.xml.bind.api:main.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=org.jboss.as.jsf:main.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-partial-bean-module-api-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator:main.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/rewrite-integration-cdi-3.4.1.Final.jar],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-jpa-module-impl-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=org.jberet.jberet-core:main.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=org.wildfly.extension.messaging-activemq:main.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/picketlink-impl-2.7.1.Final.jar],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-proxy-module-api-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=com.sun.jsf-impl:main.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-core-impl-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=/d:/development/git/my-project/content/my-app.war/WEB-INF/lib/rewrite-servlet-3.4.1.Final.jar],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-jsf-module-api-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-security-module-api-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/omnifaces-2.4.jar],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-security-module-impl-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=org.jboss.jts:main.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=deployment.my-app.war:main.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-partial-bean-module-impl-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/picketlink-api-2.7.1.Final.jar],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-data-module-impl-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war],

        - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-core-api-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=org.jboss.resteasy.resteasy-cdi:main.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator.cdi:main.additionalClasses],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-proxy-module-impl-asm5-1.7.1.jar],

        - BeanDeployment [beanDeploymentArchiveId=my-app.war/WEB-INF/lib/deltaspike-jsf-module-impl-1.7.1.jar],

              at org.jboss.weld.bootstrap.DeploymentVisitor.visit(DeploymentVisitor.java:51)

              at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:430)

              at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)

              at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:95)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

              ... 3 more

       

      From what I see, WildFly complains because there are 3 beanDeploymentArchives with Id=bootstrapBDA.additionalClasses.

       

      My application runs fine on 10.0.0. Am I missing some migration steps or something?

       

      Thanks,

       

      Xavier

        • 2. Re: WELD-000163 when I upgraded from WildFly 10.0.0 to 10.1.0
          Xavier Dury Newbie

          Thanks for the links! With the workaround, my app is working now!

          • 3. Re: WELD-000163 when I upgraded from WildFly 10.0.0 to 10.1.0
            Ed Mulemangabo Newbie

            Hi !

             

            I'm facing the same problem and don't seem to understand how to set up the workaround; would you, please, help me ? I'm using deltaSpike-1.7.1, weld 2.3.5.Final and WildFly-10.1.0.Final. My application is working correctly with WildFly-10.0.0.Final. As I upgrade to WildFly-10.1.0.Final, I get this "Non-unique bean deployment identifier detected" message with "beanDeploymentArchiveId=bootstrapBDA.additionalClasses" being displayed 15 times. Could you elaborate on how you resolved this problem ?

             

            Thanks.

             

            Ed/

            • 4. Re: WELD-000163 when I upgraded from WildFly 10.0.0 to 10.1.0
              Xavier Dury Newbie

              Hi,

               

              the problem is with extensions that are creating beans with a type coming from the JRE (java.*, com.sun.*). In my case, one of my extensions was creating JAXBContext's. What I did was to create some kind of wrapper which extends JAXBContext and use this class for my beans.

               

              Xavier

              • 5. Re: WELD-000163 when I upgraded from WildFly 10.0.0 to 10.1.0
                Ed Mulemangabo Newbie

                dear Xavier,

                 

                Thank you so much !

                I was able to fix the problem following your reply.

                 

                --

                Ed/

                • 6. Re: WELD-000163 when I upgraded from WildFly 10.0.0 to 10.1.0
                  Fabi Yo Newbie

                  Just for people who are using arquillian with JSF 2.3:

                   

                  I added JSF 2.3 dependencies and configuration to my shrinkwrap deployment using wildfly 10.1.0 manadged/embedded container. To enable JSF 2.3 a @ApplicationScoped bean was created with the annotation @FacesConfig(version = Version.JSF_2_3) on top of it.

                   

                  The tests failed with following error message:

                   

                  2017-11-30 11:37:48,284 ERROR (ServiceControllerImpl.java:1955) = MSC000001: Failed to start service jboss.deployment.unit."arquillian-eap7.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."arquillian-eap7.war".WeldStartService: Failed to start service

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                    at java.lang.Thread.run(Thread.java:748)

                  Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000163: Non-unique bean deployment identifier detected:

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=com.sun.jsf-impl:mojarra-2.3.0.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator.cdi:main.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=javax.faces.api:mojarra-2.3.0.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=/content/arquillian-eap7.war/WEB-INF/lib/cdi-api-1.0.jar],

                    - BeanDeployment [beanDeploymentArchiveId=/content/arquillian-eap7.war],

                    - BeanDeployment [beanDeploymentArchiveId=org.jboss.as.jsf:main.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=/content/arquillian-eap7.war/WEB-INF/lib/javax.faces-api-2.3.jar],

                    - BeanDeployment [beanDeploymentArchiveId=/content/arquillian-eap7.war/WEB-INF/lib/javaee-api-7.0.jar],

                    - BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator:main.additionalClasses],

                    - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses]

                    at org.jboss.weld.bootstrap.DeploymentVisitor.visit(DeploymentVisitor.java:51)

                    at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:430)

                    at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)

                    at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:95)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

                    ... 3 more

                   

                  Removing the @FacesConfig(version = Version.JSF_2_3) made the tests work again, untill the point I needed a specific JSF 2.3 feature. So I was forced to use the @FacesConfig(version = Version.JSF_2_3) annotation.

                   

                  I reverted wildfly to 10.0.0 and had a small issue with my standalone.xml used by the arquillian tests (copied from git logs):

                   

                  -<server xmlns="urn:jboss:domain:4.1">

                  +<server xmlns="urn:jboss:domain:4.0">

                   

                  -        <subsystem xmlns="urn:jboss:domain:undertow:3.1">

                  +        <subsystem xmlns="urn:jboss:domain:undertow:3.0">

                   

                  Replacing this older schema names and reverting to wildfly 10.0.0 made my arquillian tests run again with full JSF 2.3 features!