4 Replies Latest reply on Jan 7, 2014 6:13 AM by ankitceo2

    Problem with deployoing ear on JBoss AS7 while it worked on AS5

    ankitceo2

      Hi Everyone,

                        I have an ear to be deployed on JBoss AS7. The ear file NxServices.ear has the following structure.

       

           |- META-INF [It has some manifest files and .xml files]

           |- lib [Containing jars]

           |- xyz.jar

           |- abc.jar

           |- a-file.rar

           |- some-xml-files.xml

           |- one-web.war

       

      It is working fine on JBoss AS5 but when we are trying to migrate it to JBoss AS7, it is generating error as following

      ==================================================================================================================================

       

      15:58:19,752 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "NxServices.ear"

      15:58:19,764 WARN  [org.jboss.metadata.parser.jboss.JBossAppMetaDataParser] (MSC service thread 1-2) loader-repository element in jboss-app.xml is deprecated and has been ignored

      15:58:21,166 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."NxServices.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."NxServices.ear".STRUCTURE: Failed to process phase STRUCTURE of deployment "NxServices.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(Unknown Source) [rt.jar:1.7.0_13]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_13]

          at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_13]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011060: Failed to process children for EAR ["/C:/jbossAS7/bin/content/NxServices.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_13]

          at java.util.zip.ZipFile.<init>(Unknown Source) [rt.jar:1.7.0_13]

          at java.util.zip.ZipFile.<init>(Unknown Source) [rt.jar:1.7.0_13]

          at java.util.jar.JarFile.<init>(Unknown Source) [rt.jar:1.7.0_13]

          at java.util.jar.JarFile.<init>(Unknown Source) [rt.jar:1.7.0_13]

          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

       

      15:58:21,188 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment NxServices.ear in 0ms

      15:58:21,188 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "NxServices.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"NxServices.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"NxServices.ear\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"NxServices.ear\""}}

      15:58:21,193 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report

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

       

      15:58:21,196 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.\"NxServices.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"NxServices.ear\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"NxServices.ear\""}}}}

       

      ======================================================================================================================================

       

      The things I have tried are:

      1). I have tried remove all the xml files from ear root that is |- .xmls and put them in |- META-INF. But got the same error.

       

      2). Then I tried remove the |- some-rar-file.rar and accordingly updated the application.xml in |- META-INF but it also did not resolve the error.

      3). Also tried a combination of the 1 and 2 mentioned above.

       

      4). Also tried remove the .war and accordingly updated application.xml in |- META-INF but still got the same error.

      5). also tried 3 and 4 together but no success.

       

      I do not understand what it is trying to parse first that it is not able to open and saying unable to open zip file.

      I do not know if there is some problem with some xml file particularly being used in the project.

       

      Please help I need it solved very badly.

       

      Thanks

      Ankit

        • 1. Re: Problem with deployoing ear on JBoss AS7 while it worked on AS5
          lafr

          Where is this path ["/C:/jbossAS7/bin/content/NxServices.ear"] coming from?

          Deployment folder is usually something like $JBOSS_HOME/standalone/deployments.

          • 2. Re: Problem with deployoing ear on JBoss AS7 while it worked on AS5
            ankitceo2

            Hi Frank,

                         I am not even able to see the content directory within /C:/jbossAS7/bin dir. May be it is created by the JBoss deployer at the "deploying" time and the deleted. I always copy the deployables to $JBOSS_HOME/standalone/deployments dir. And even in this case also I have done the copying to the same dir, the deployments within JBOSS_HOME.  

            • 3. Re: Problem with deployoing ear on JBoss AS7 while it worked on AS5
              jaikiran

              What does the application.xml and jboss-app.xml look like in the .ear file?

               

              Also note that it's better to use the latest released WildFly version Downloads · WildFly instead of using JBoss AS 7 which was released almost 2 years ago.

              • 4. Re: Problem with deployoing ear on JBoss AS7 while it worked on AS5
                ankitceo2

                Hi jaikiran,

                              I can not use wildfly as of now because of some unavoidable reasons. Following are the structures of jboss.xml and Application.xml.

                =====================================

                jboss-app.xml

                =====================================

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

                <!DOCTYPE jboss-app

                        PUBLIC "-//JBoss//DTD J2EE Application 4.2//EN"

                        "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd">

                <jboss-app>

                    <loader-repository>

                        com.osi:archive=nxservices

                    </loader-repository>

                    <module>

                        <service>osi-topics-service.xml</service>

                    </module>

                    <module>

                        <service>osi-properties-service.xml</service>

                    </module>

                    <module>

                        <service>dmpjca-ds.xml</service>

                    </module>

                    <module>

                        <service>osi-tt-config-service.xml</service>

                    </module>

                </jboss-app>

                 

                 

                 

                 

                =====================================================================================================================

                 

                 

                ###################################################

                application.xml

                ###################################################

                <?xml version="1.0" encoding="ASCII"?>

                <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">

                  <display-name>NxServices</display-name>

                  <module>

                    <ejb>nxsystem-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>attrdef-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>alert-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>mo-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>auth-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>moclass-service.jar</ejb>

                  </module>

                  <module>

                    <connector>dmp-jca.rar</connector>

                  </module>

                  <module>

                    <ejb>dmpadmin-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>dmpdatapath-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>dmpgwa-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>dmppolicy-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>dmpsysconfig-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>apmconfig-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>keygen-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>alert-history-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>apmkpi-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>gwa-service.jar</ejb>

                  </module>

                  <module id="GWAServlet">

                    <web>

                      <web-uri>gwa-servlet.war</web-uri>

                      <context-root>NXServicesGWAServlet</context-root>

                    </web>

                  </module>

                  <module>

                    <ejb>dbschema.jar</ejb>

                  </module>

                  <module>

                    <ejb>tt-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>oprmsg-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>propagation-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>summarization-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>oprmsg-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>license-service.jar</ejb>

                  </module>

                  <module>

                    <ejb>dynamic-actions.jar</ejb>

                  </module>

                  <module>

                      <ejb>modelinfo-service.jar</ejb>

                  </module>

                  <module>

                      <ejb>slaconfig-service.jar</ejb>

                  </module>

                </application>

                 

                ########################################################################################################################################