11 Replies Latest reply on Jul 19, 2013 4:20 AM by ejb3workshop

    Porting to JBoss 7.X

    ejb3workshop

      When deploying our application which worked find in JBoss 4 and 5 into JBoss 7.X.X we are getting the following exception.

      16:30:03,631 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 6374ms - Started 169 of 248 services (78 services are passive or on-demand)

      16:37:38,610 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "ABCDEFEJB.ear"

      16:38:00,535 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."ABCDEFEJB.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ABCDEFEJB.ear".STRUCTURE: Failed to process phase STRUCTURE of

      deployment "ABCDEFEJB.ear"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]

              at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011060: Failed to process children for EAR ["/D:/jboss-as-7.1.1.Final/bin/content/ABCDEFEJB.ear"]

              at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:218)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

              ... 5 more

      Caused by: java.util.zip.ZipException: error in opening zip file

              at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_25]

              at java.util.zip.ZipFile.<init>(ZipFile.java:215) [rt.jar:1.7.0_25]

              at java.util.zip.ZipFile.<init>(ZipFile.java:145) [rt.jar:1.7.0_25]

              at java.util.jar.JarFile.<init>(JarFile.java:153) [rt.jar:1.7.0_25]

              at java.util.jar.JarFile.<init>(JarFile.java:117) [rt.jar:1.7.0_25]

              at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:97)

              at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:83)

              at org.jboss.vfs.VFS.mountZip(VFS.java:408)

              at org.jboss.vfs.VFS.mountZip(VFS.java:434)

              at org.jboss.as.ee.structure.EarStructureProcessor.mount(EarStructureProcessor.java:223)

              at org.jboss.as.ee.structure.EarStructureProcessor.createResourceRoot(EarStructureProcessor.java:242)

              at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:176)

              ... 6 more

       

      16:38:00,691 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "ABCDEFEJB.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"ABCDEFEJB.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in

      service jboss.deployment.unit.\"ABCDEFEJB.ear\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"ABCDEFEJB.ear\""}}

      16:38:00,695 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment ABCDEFEJB.ear in 4ms

      16:38:00,710 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.deployment.unit."ABCDEFEJB.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ABCDEFEJB.ear".STRUCTURE: Failed to process phase STRUCTURE of deployment "ABCDEFEJB.ear"

       

      16:38:00,728 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"ABCDEFEJB.ear\".STRUCTURE" => "org.

      jboss.msc.service.StartException in service jboss.deployment.unit.\"ABCDEFEJB.ear\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"ABCDEFEJB.ear\""}}}}

      In previous releases the error messages were a lot more informative. This error tells you very little about the actual cause of the problem or how to fix it.

       

      Any pointers on what to do, to get the application working on JBoss 7 ?

        • 1. Re: Porting to JBoss 7.X
          sfcoy

          What is the output of

           

               jar tf ABCDEFEJB.ear

           

          ?

          • 2. Re: Porting to JBoss 7.X
            ejb3workshop

            I trimmed down my application to create an isolated case. Also switched from 7.1.1 to 7.2 as the error messages from 7.1.1 were not helpful. Using 7.2 I managed to make progress.

             

            Here is what I found

             

            The following simple application deploys correctly:

            jar tf SimpleBean.ear

            META-INF/

            META-INF/MANIFEST.MF

            JBoss4.dpf

            META-INF/jboss-app.xml

            META-INF/ABC-hornetq-jms.xml

            SimpleBean-ejb.jar

            However as soon as I include the application.xml deployment descriptor I get the following error on deployment:

             

             

            STRUCTURE of deployment "SimpleBean.ear"

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]

                    at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

            Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS016701: Unsupported ear module type: ABC-hornetq-jms.xml

                    at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:170)

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                    ... 5 more

            I tried various different versions of the application.xml file using different schema and versions, however even the most basic one resulted in this error:

             

             

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

            <application>

                <display-name>ABCEE</display-name>

            </application>

            Before you go off and tell me to avoid using deployment descriptor, unfortunately some lesser application servers require these to be present.

            • 3. Re: Porting to JBoss 7.X
              sfcoy

              Is that the exact error message you get with that application.xml file?

               

              The error message suggests that at one point you referenced ABC-hornetq-jms.xml in the application.xml (or perhaps the jboss-app.xml).

              • 4. Re: Porting to JBoss 7.X
                ejb3workshop

                I am only getting the error when the EAR includes the application.xml file. The application.xml file is exactly as shown. The jboss-app.xml file contains a reference to ABC-hornetq-jms.xml in both test cases (with/without application.xml).

                • 5. Re: Porting to JBoss 7.X
                  sfcoy

                  What does your jboss-app.xml file look like?

                  • 6. Re: Porting to JBoss 7.X
                    ejb3workshop

                    Here is the jboss-app.xml file

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

                    <jboss-app>

                      <module>

                        <service>ABC-hornetq-jms.xml</service>

                      </module>

                    </jboss-app>

                    • 7. Re: Porting to JBoss 7.X
                      ejb3workshop

                      Working EAR file attached

                      • 8. Re: Porting to JBoss 7.X
                        ejb3workshop

                        Broken EAR file attached

                        • 9. Re: Porting to JBoss 7.X
                          sfcoy

                          Alexander Hartner wrote:

                           

                          Here is the jboss-app.xml file

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

                          <jboss-app>

                            <module>

                              <service>ABC-hornetq-jms.xml</service>

                            </module>

                          </jboss-app>

                          Normally I would expect to see a .sar file instead of an XML file here. It looks like JBossAS is trying to treat it as an archive. Did this work in earlier version of JBossAS?

                           

                          I think the EAR without application.xml deploys because the jboss-app.xml is only parsed if there is application.xml present.

                          • 10. Re: Porting to JBoss 7.X
                            ejb3workshop

                            This worked in JBoss 4 and 5.The JBoss deployment descriptor pages also mentions the *-jms.xml files (https://docs.jboss.org/author/display/AS71/Deployment+Descriptors+used+In+AS7.1). Maybe I just remove it from being explicitly referenced in the jboss-app.xml file and see if this resolves my issue.

                            • 11. Re: Porting to JBoss 7.X
                              ejb3workshop

                              Removing the reference form jboss-app.xml resolved the issue. The queues specified in the *-jms.xml file are still being created.

                               

                              Thanks for your help on this.