7 Replies Latest reply on Apr 1, 2011 4:38 PM by enpasos

    Can't deploy .war to JBOSS 6.0

    samwun9988

      Hello,

       

      I don't understand the deployment of this simple war file is failed on jboss 6.0.

       

      Here is the exception:

       

      01:06:29,890 WARN  [org.jboss.profileservice.deployment.hotdeploy.HDScanner] Failed to add deployment: vfs:///C:/jboss-6.0.0.Final/server/default/deploy/ResourceA.war: org.jboss.deployers.spi.DeploymentException: Failed to mount archive: "/C:/jboss-6.0.0.Final/server/default/deploy/ResourceA.war"

                at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]

                at org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer.mountArchive(AbstractVFSArchiveStructureDeployer.java:132) [:2.2.0.GA]

                at org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer.determineStructure(AbstractVFSArchiveStructureDeployer.java:55) [:2.2.0.GA]

                at org.jboss.deployers.vfs.plugins.structure.StructureDeployerWrapper.determineStructure(StructureDeployerWrapper.java:73) [:2.2.0.GA]

                at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.doDetermineStructure(VFSStructuralDeployersImpl.java:197) [:2.2.0.GA]

                at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:222) [:2.2.0.GA]

                at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:77) [:2.2.0.GA]

                at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:1106) [:2.2.0.GA]

                at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeploymentContext(MainDeployerImpl.java:417) [:2.2.0.GA]

                at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:367) [:2.2.0.GA]

                at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:277) [:2.2.0.GA]

                at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.addDeployment(MainDeployerPlugin.java:77) [:6.0.0.Final]

                at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.addDeployment(ProfileControllerContext.java:133) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:221) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

                at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

                at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]

                at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]

                at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]

                at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [:1.6.0_21]

                at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source) [:1.6.0_21]

                at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [:1.6.0_21]

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source) [:1.6.0_21]

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source) [:1.6.0_21]

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [:1.6.0_21]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_21]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_21]

                at java.lang.Thread.run(Unknown Source) [:1.6.0_21]

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

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

                at java.util.zip.ZipFile.<init>(Unknown Source) [:1.6.0_21]

                at java.util.jar.JarFile.<init>(Unknown Source) [:1.6.0_21]

                at java.util.jar.JarFile.<init>(Unknown Source) [:1.6.0_21]

                at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:94) [jboss-vfs.jar:3.0.0.GA]

                at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:80) [jboss-vfs.jar:3.0.0.GA]

                at org.jboss.vfs.VFS.mountZip(VFS.java:428) [jboss-vfs.jar:3.0.0.GA]

                at org.jboss.vfs.VFS.mountZip(VFS.java:454) [jboss-vfs.jar:3.0.0.GA]

                at org.jboss.vfs.util.automount.Automounter$RegistryEntry.mount(Automounter.java:237) [jboss-vfs.jar:3.0.0.GA]

                at org.jboss.vfs.util.automount.Automounter$RegistryEntry.access$000(Automounter.java:208) [jboss-vfs.jar:3.0.0.GA]

                at org.jboss.vfs.util.automount.Automounter.mount(Automounter.java:117) [jboss-vfs.jar:3.0.0.GA]

                at org.jboss.vfs.util.automount.Automounter.mount(Automounter.java:77) [jboss-vfs.jar:3.0.0.GA]

                at org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer.performMount(AbstractVFSArchiveStructureDeployer.java:145) [:2.2.0.GA]

                at org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer.mountArchive(AbstractVFSArchiveStructureDeployer.java:128) [:2.2.0.GA]

                ... 32 more

       

      I have deploy the same war file to tomcat , it is successful.

       

      Can anyone please shed some light on me?

       

      Thanks

      sam

        • 1. Can't deploy .war to JBOSS 6.0
          jaikiran

          How big is the ResourceA.war file? Are you hot deploying it? Can you try stopping the server, placing that .war in JBOSS_HOME/server/default/deploy and then starting the server? Does that work?

          • 2. Can't deploy .war to JBOSS 6.0
            peterj

            I have seen this zip file error under two situations:

             

            1) The hot deployer attempts to deploy the app before it is fully copied into the deploy directory. This can happen if you have a large app archive (WAR, EAR, etc) and you are copying over a slow connection, such as a network (hence Jaikirans questions). A typical solution to this is to copy the app archive to another location on the same paratition as the app server and then move the app arhive to the deploy directory.

             

            2) You used some third-party utility (such as 7-zip) to build the app archive and used a conpression mechanism incompatible with Java compression. If you did this, then don't! Use standard zip compression or use the standard tools.

            • 3. Can't deploy .war to JBOSS 6.0
              samwun9988

              Hello Peter,

               

              I have tried to export the .WAR to another folder before copied it over to the jboss deploy folder.

              and I don't have 7-zip in my home pc.

               

              Thanks

              Sam

              • 4. Can't deploy .war to JBOSS 6.0
                djheisterberg

                Try running 'jar xf' on the war file to check that the standard tools can read it.

                • 5. Can't deploy .war to JBOSS 6.0
                  peterj
                  before copied it over to the jboss deploy folder

                  I said "move" not "copy".

                   

                  I don't have 7-zip in my home pc.

                  7-Zip was an example - you never answered the question I asked. Though David did give you an example of one of the things you couldh ave tried...

                  • 6. Can't deploy .war to JBOSS 6.0
                    enpasos

                    I have the same problem - file size: 61 MB - problem only on linux not on windows - no solution, yet.

                    • 7. Can't deploy .war to JBOSS 6.0
                      enpasos

                      NOT FUNNY and NOT RELATED TO THE DATE 1.4.:
                      For me the workaround was to make JBOSS belief the app.war was a SEAM application (by adding seam.properties). Therefore I assume that JBOSS could be fixed in such a way that any app.war could be deployed without that exception.