9 Replies Latest reply on Feb 12, 2015 4:24 PM by Tomaz Cerar

    EAR Deployment Problem JBoss AS 7.0.2

    nuki Newbie

      Hello,

       

      I am developing a lot of EJB 3 application in the past year. I deployed them successfully on JBoss AS 5.1 and JBoss AS 6.0. Today I tried to deploy one of my applications to the current Version of the JBoss AS 7. I am impressed of the startup-time and I just have to use this great piece of software for hosting my applications :-)

       

      I started the application server with the standalone.sh command on my Ubuntu Linix 11.04. A Sun JDK 1.6.26 is installed. When i copied the enterprise archive file to the deployment folder, i get the following output:

       

      17:57:40,655 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "booking.ear"
      17:57:40,716 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."booking.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."booking.ear".STRUCTURE: Failed to process phase STRUCTURE of deployment "booking.ear"
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
          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_26]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
          at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to process children for EAR ["/content/booking.ear"]
          at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:197)
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
      
          ... 5 more
      Caused by: java.util.zip.ZipException: error in opening zip file
          at java.util.zip.ZipFile.open(Native Method) [:1.6.0_26]
          at java.util.zip.ZipFile.<init>(ZipFile.java:127) [:1.6.0_26]
          at java.util.jar.JarFile.<init>(JarFile.java:135) [:1.6.0_26]
          at java.util.jar.JarFile.<init>(JarFile.java:99) [:1.6.0_26]
          at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:95) [jboss-vfs-3.0.1.GA.jar:3.0.1.GA]
          at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:81) [jboss-vfs-3.0.1.GA.jar:3.0.1.GA]
          at org.jboss.vfs.VFS.mountZip(VFS.java:408) [jboss-vfs-3.0.1.GA.jar:3.0.1.GA]
          at org.jboss.vfs.VFS.mountZip(VFS.java:434) [jboss-vfs-3.0.1.GA.jar:3.0.1.GA]
          at org.jboss.as.ee.structure.EarStructureProcessor.mount(EarStructureProcessor.java:202)
          at org.jboss.as.ee.structure.EarStructureProcessor.createResourceRoot(EarStructureProcessor.java:221)
          at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:181)
          ... 6 more
      
      17:57:40,723 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment booking.ear in 3ms
      17:57:40,724 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "booking.ear" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"booking.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"booking.ear\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"booking.ear\""}}
      17:57:40,725 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"booking.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"booking.ear\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"booking.ear\""}}}}
      

       

       

      First I thought it is a access problem, so I chmod 777 to the .ear file. But that did not solve the problem for me :-(

       

      Here is the structure of my .ear file:

       

      $ jar -tf booking.ear 
      META-INF/
      META-INF/MANIFEST.MF
      META-INF/application.xml
      META-INF/persistence.xml
      META-INF/application.properties
      META-INF/struts2ejb3.properties
      mysql-ds.xml
      booking.war
      booking.jar
      ejb-user.jar
      ejb-common-entity.jar
      ejb-changelog.jar
      lib/
      lib/common-util.jar
      lib/hibernate-search-3.4.1.Final.jar
      lib/lucene-core-3.1.0.jar
      

       

      I used the search function and read the documentation but I really get stuck with this problem. Can anyone help? If you need some additional informations, let me know.

       

      kind regards

        • 1. Re: EAR Deployment Problem JBoss AS 7.0.2
          jaikiran pai Master

          Since the jar -tf seems to be working fine, the archive isn't corrupt. So I'm not sure why you are seeing that error. Can you do a jar -tf on the individual jar/wars within the .ear and see if they are fine?  Try eliminating those jars one by one and see which one causes the issue. Then we can try and see why it's a problem.

          • 2. Re: EAR Deployment Problem JBoss AS 7.0.2
            nuki Newbie

            Thanks for the quick reply. Here are the requested informations

             

            I think the problem is the datasource xml file "mysql-ds.xml" in the ear structure. After i removed the file and the entry from the application xml, the deployment worked for me (with some hibernate errors, but that will be solved).

             

            Is there something I have to know about datasources in the new JBoss AS7 Version?

            • 3. Re: EAR Deployment Problem JBoss AS 7.0.2
              Prashanth Kokati Newbie

              Hi,

               

              I am also getting similar exception,when I am trying to deploy my ear. I dont have mysql-ds.xml as I have used the standalone.xml's datasource tags. Everything else isas expected and am able to tar -tf hawk-all.ear also.

               

              Exception while loading..

              12:07:32,396 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."hawk-all.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."hawk-all.ear".STRUCTURE: Failed to process phase STRUCTURE of deployment "hawk-all.ear"

                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)

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

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

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

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

                        at java.lang.Thread.run(Thread.java:680) [:1.6.0_26]

              Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to process children for EAR ["/content/hawk-all.ear"]

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

                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

                        ... 5 more

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

                        at java.util.zip.ZipFile.open(Native Method) [:1.6.0_26]

                        at java.util.zip.ZipFile.<init>(ZipFile.java:127) [:1.6.0_26]

                        at java.util.jar.JarFile.<init>(JarFile.java:135) [:1.6.0_26]

                        at java.util.jar.JarFile.<init>(JarFile.java:99) [:1.6.0_26]

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

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

                        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:202)

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

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

                        ... 6 more

               

               

              Any ideas?

              • 4. Re: EAR Deployment Problem JBoss AS 7.0.2
                Prashanth Kokati Newbie

                Looks like this maybe because the VirtualFile (hawk-all.ear) is not copied over to the "jboss/standalone/data/content/" folder,because of which we are seeing java.util.zip.ZipException. Or  am I totally missing something?

                • 5. Re: EAR Deployment Problem JBoss AS 7.0.2
                  sesharao_n Newbie

                  Hi All,

                  i am also facing same problem, if any one of you find the solution please post it.

                  • 6. Re: EAR Deployment Problem JBoss AS 7.0.2
                    Kr Reddy Newbie

                    any solution found on this issue?

                    • 7. Re: EAR Deployment Problem JBoss AS 7.0.2
                      Tomaz Cerar Master

                      your ear file is corrupt and it cannot be opened as ZIP.

                       

                      also try with something newer than AS 7.0.x

                      • 8. Re: EAR Deployment Problem JBoss AS 7.0.2
                        Kr Reddy Newbie

                        Hi Tomaz,

                        Thanks for your response. I tried removing all zip versions of the files, rebuilt the app using ant to have only .jars. My current app was deployed in WAS 7 with Java 6. I am trying  to migrate the same to Jboss EAP 6.3 with Java 6 (wildfly is not compatible with Java 6) . I therefore ensured that there are no references to WAS in my app and ant build scripts. I am still getting the same error as in the original post above. kindly let me know if you have any ideas.

                        • 9. Re: EAR Deployment Problem JBoss AS 7.0.2
                          Tomaz Cerar Master

                          Problem is ear itself.

                          try test it with

                           

                          jar tf <path-to-your-ear>

                           

                          Also why not go to WildFly? Java 6 & 7 should be be an issue, keep in mind that JDK6 is EOL-ed for some time now.

                          Bigger change is Java EE 7 vs 6 in EAP6/AS7

                          but shouldn't be big deal anyway, you might need to tweak few things around CDI deployments if you use any but beyond that you should be fine.