8 Replies Latest reply on Mar 12, 2014 6:24 PM by piwaf

    EAR Deployment fails on JBoss AS 7.1 CR1

    pkilian

      Hello,

       

      if we deploy our EAR-File on JBoss AS 7.1 CR1, it fails with following error:

       

      07:59:02,966 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.subunit."webstage-login-server.ear"."webstage-login-server.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."webstage-login-server.ear"."webstage-login-server.jar".PARSE: Failed to process phase PARSE of subdeployment "webstage-login-server.jar" of deployment "webstage-login-server.ear"

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.CR1.jar:7.1.0.CR1]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

                at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

      Caused by: java.lang.IllegalArgumentException: JBAS011046: A component named 'LoginSessionMgrBean' is already defined in this module

                at org.jboss.as.ee.component.EEModuleDescription.addComponent(EEModuleDescription.java:132)

                at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processSessionBeans(SessionBeanComponentDescriptionFactory.java:169)

                at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processAnnotations(SessionBeanComponentDescriptionFactory.java:91)

                at org.jboss.as.ejb3.deployment.processors.EJBComponentDescriptionFactory.deploy(EJBComponentDescriptionFactory.java:69)

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.CR1.jar:7.1.0.CR1]

                ... 5 more

       

      The same EAR deploys on JBoss 7.1 Beta1 without any error and is running well.

       

      Any hints what causes the problem?

       

      Best regards

       

      Peter Kilian

        • 1. Re: EAR Deployment fails on JBoss AS 7.1 CR1
          jaikiran

          Do you have 2 beans named LoginSessionMgrBean in the webstage-login-server.jar?

          • 2. Re: EAR Deployment fails on JBoss AS 7.1 CR1
            pkilian

            No, there is only one bean named LoginSessionMgrBean in the webstage-login-server.jar.

            • 3. Re: EAR Deployment fails on JBoss AS 7.1 CR1
              pkilian

              I removed my code from the webstage-login-server.jar an replaced it with the CalculatorBean from https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI I changed only the name from the Bean to CalculatorMgrBean and the name of the remote Interface to CalculatorMgr (so the build script is working without modifications).

              Now the error is:

              08:06:27,189 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.subunit."webstage-login-server.ear"."webstage-login-server.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."webstage-login-server.ear"."webstage-login-server.jar".PARSE: Failed to process phase PARSE of subdeployment "webstage-login-server.jar" of deployment "webstage-login-server.ear"

                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.CR1.jar:7.1.0.CR1]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

                        at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

              Caused by: java.lang.IllegalArgumentException: JBAS011046: A component named 'CalculatorMgrBean' is already defined in this module

                        at org.jboss.as.ee.component.EEModuleDescription.addComponent(EEModuleDescription.java:132)

                        at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processSessionBeans(SessionBeanComponentDescriptionFactory.java:169)

                        at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processAnnotations(SessionBeanComponentDescriptionFactory.java:91)

                        at org.jboss.as.ejb3.deployment.processors.EJBComponentDescriptionFactory.deploy(EJBComponentDescriptionFactory.java:69)

                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.CR1.jar:7.1.0.CR1]

                        ... 5 more

              • 4. Re: EAR Deployment fails on JBoss AS 7.1 CR1
                jaikiran

                Post the output of

                 

                jar -tf webstage-login-server.jar

                 

                and

                 

                jar -tf webstage-login-server.ear

                 

                Also, if you have any application.xml and/or ejb-jar.xml, post the contents of those files too.

                • 5. Re: EAR Deployment fails on JBoss AS 7.1 CR1
                  pkilian

                  i attached the EAR file.

                   

                  The output of jar -tf webstage-login-server.ear:

                  lib/

                  lib/commons-codec-1.4.jar

                  lib/log4j-1.2.16.jar

                  META-INF/

                  META-INF/application.xml

                  META-INF/jboss-app.xml

                  webstage-login-server.jar

                   

                  The output of jar -tf webstage-login-server.jar:


                  META-INF/

                  META-INF/MANIFEST.MF

                  de/

                  de/hama/

                  de/hama/webstage/

                  de/hama/webstage/loginServer/

                  de/hama/webstage/loginServer/loginMgr/

                  de/hama/webstage/loginServer/loginMgr/CalculatorMgr.class

                  de/hama/webstage/loginServer/loginMgr/CalculatorMgrBean.class

                  log4j.xml

                  META-INF/orm.xml

                  META-INF/persistence.xml

                   

                  The application.xml:

                   

                  <?xml version="1.0" encoding="UTF-8"?>

                  <application id="Application_ID" version="1.4"

                            xmlns="http://java.sun.com/xml/ns/j2ee"

                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                            xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">

                            <display-name>Netport LoginServer</display-name>

                   

                            <module>

                                      <ejb>webstage-login-server.jar</ejb>

                            </module>

                  </application>

                   


                  • 6. Re: EAR Deployment fails on JBoss AS 7.1 CR1
                    jaikiran

                    The webstage-login-server.jar contains a META-INF/MANIFEST.MF with the following (Class-Path) contents:

                     

                    Manifest-Version: 1.0

                    Ant-Version: Apache Ant 1.8.2

                    Created-By: 1.6.0_24-b07 (Sun Microsystems Inc.)

                    Class-Path: . lib/log4j-1.2.16.jar

                     

                    You don't need that Class-Path attribute (especially not the "."). So remove that Class-Path attribute from the MANIFEST.MF and that should get you past this issue.

                    • 7. Re: EAR Deployment fails on JBoss AS 7.1 CR1
                      pkilian

                      Thank you for your support.

                      • 8. Re: EAR Deployment fails on JBoss AS 7.1 CR1
                        piwaf

                        Just for anyone out there, I had a bean annotated with @Singleton and @Stateless that triggered this error.  My code was of course wrong but the message and posts like this lead me down the wrong path for a while.