12 Replies Latest reply on May 15, 2009 2:56 AM by jaikiran

    Hot-deployment on AS 5.x

    jesper.pedersen

      I get stack traces when I hot-deploy on AS 5.x (currently rev88714 using VFS-2.1.1.GA).

      Sample application is the web ui for JBoss Profiler 2 - a .WAR file around 6MB - deployment is done in non-exploded format. The stack traces can be easy triggered if the deployments are done in a tight loop.

      Here is one:

      06:27:17,412 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/jboss-profiler'
      06:27:29,198 INFO [TomcatDeployment] undeploy, ctxPath=/jboss-profiler
      06:27:29,224 ERROR [WebBeansWebUrlIntegrationDeployer] Error during undeploy: vfszip:/home/jews/jboss-5.1.0.GA/server/default/deploy/jboss-profiler.war/
      java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
       at org.jboss.virtual.plugins.context.AbstractExceptionHandler.handleZipEntriesInitException(AbstractExceptionHandler.java:39)
       at org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler.handleZipEntriesInitException(NamesExceptionHandler.java:63)
       at org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:616)
       at org.jboss.virtual.plugins.context.zip.ZipEntryContext.checkIfModified(ZipEntryContext.java:763)
       at org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(ZipEntryContext.java:807)
       at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.createChildHandler(ZipEntryHandler.java:191)
       at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:684)
       at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:165)
       at org.jboss.virtual.plugins.context.DelegatingHandler.getChild(DelegatingHandler.java:107)
       at org.jboss.virtual.VirtualFile.getChild(VirtualFile.java:481)
       at org.jboss.deployers.vfs.plugins.structure.VFSDeploymentResourceLoaderImpl.getFile(VFSDeploymentResourceLoaderImpl.java:62)
       at org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext.getFile(AbstractVFSDeploymentContext.java:352)
       at org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentUnit.getFile(AbstractVFSDeploymentUnit.java:101)
       at org.jboss.deployers.vfs.plugins.classloader.PathUrlIntegrationDeployer.isIntegrationDeployment(PathUrlIntegrationDeployer.java:48)
       at org.jboss.deployers.vfs.plugins.classloader.UrlIntegrationDeployer.isIntegrationDeployment(UrlIntegrationDeployer.java:183)
       at org.jboss.deployers.vfs.plugins.classloader.UrlIntegrationDeployer.undeploy(UrlIntegrationDeployer.java:143)
       at org.jboss.deployers.vfs.spi.deployer.AbstractOptionalVFSRealDeployer.undeploy(AbstractOptionalVFSRealDeployer.java:76)
       at org.jboss.deployers.spi.deployer.helpers.AbstractOptionalRealDeployer.internalUndeploy(AbstractOptionalRealDeployer.java:91)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:196)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1469)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1376)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1331)
       at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1664)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1275)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:694)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)
       at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:338)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:231)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:146)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:170)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.util.zip.ZipException: error in opening zip file
       at java.util.zip.ZipFile.open(Native Method)
       at java.util.zip.ZipFile.<init>(ZipFile.java:203)
       at java.util.zip.ZipFile.<init>(ZipFile.java:234)
       at org.jboss.virtual.plugins.context.zip.ZipFileWrapper.ensureZipFile(ZipFileWrapper.java:175)
       at org.jboss.virtual.plugins.context.zip.ZipFileWrapper.acquire(ZipFileWrapper.java:245)
       at org.jboss.virtual.plugins.context.zip.ZipEntryContext.initEntries(ZipEntryContext.java:474)
       at org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:609)
       ... 39 more
      06:27:31,473 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/home/jews/jboss-5.1.0.GA/server/default/deploy/jboss-profiler.war/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Failed to create web module
       at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:447)
       at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:84)
       at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
       at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:338)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:231)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:146)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:170)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
       at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:216)
       at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:134)
       at java.util.zip.ZipInputStream.read(ZipInputStream.java:139)
       at java.util.jar.JarInputStream.read(JarInputStream.java:171)
       at org.jboss.util.file.JarUtils.unjar(JarUtils.java:301)
       at org.jboss.virtual.plugins.copy.AbstractCopyMechanism.unjar(AbstractCopyMechanism.java:320)
       at org.jboss.virtual.plugins.copy.UnjarCopyMechanism.doCopy(UnjarCopyMechanism.java:52)
       at org.jboss.virtual.plugins.copy.AbstractCopyMechanism.copy(AbstractCopyMechanism.java:176)
       at org.jboss.virtual.plugins.copy.AbstractCopyMechanism.copy(AbstractCopyMechanism.java:135)
       at org.jboss.virtual.VFSUtils.copy(VFSUtils.java:871)
       at org.jboss.virtual.VFSUtils.unjar(VFSUtils.java:852)
       at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:346)
       ... 28 more
      06:27:31,489 WARN [HDScanner] Failed to process changes
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** DEPLOYMENTS IN ERROR: Name -> Error
      
      vfszip:/home/jews/jboss-5.1.0.GA/server/default/deploy/jboss-profiler.war/ -> org.jboss.deployers.spi.DeploymentException: Failed to create web module
      
      
      DEPLOYMENTS IN ERROR:
       Deployment "vfszip:/home/jews/jboss-5.1.0.GA/server/default/deploy/jboss-profiler.war/" is in error due to the following reason(s): java.io.EOFException: Unexpected end of ZLIB input stream
      
       at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
       at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:345)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:231)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:146)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:170)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      06:28:14,100 INFO [TomcatDeployment] deploy, ctxPath=/jboss-profiler
      06:28:14,379 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/jboss-profiler'
      


      HTH

        • 1. Re: Hot-deployment on AS 5.x
          jaikiran

          Might be related to the HDScanner picking up the deployment before the copy of the war, to the deploy folder, is complete. One way to verify this would be to increase the HDScanner timeout to a higher value (which will reduce the chances of picking up the stale deployment -though it can't be completely ruled out):


          <!--Increase to a higher value -->
          <property name="scanPeriod">5000</property>


          • 2. Re: Hot-deployment on AS 5.x
            jesper.pedersen

            Users shouldn't have to worry about the scanPeriod parameter - a deployment should be an atomic operation.

            • 3. Re: Hot-deployment on AS 5.x
              jaikiran

               

              "jesper.pedersen" wrote:
              a deployment should be an atomic operation.


              Yep. But i think the issue is:

              1) A OS copy operation is in progress
              2) HDScanner wakes up and does a check for new file availability
              3) OS says new file available, even though copy is not complete (i remember this on Windows, not sure about other OS)
              4) HDScanner starts processing the deployment while the file is still being copied
              5) HDScanner blows up with exception since its a corrupt file.

              And i guess, we will be able to reproduce this on JBossAS-4.x too.



              • 4. Re: Hot-deployment on AS 5.x
                jesper.pedersen

                Here is another one:

                09:01:10,998 INFO [TomcatDeployment] deploy, ctxPath=/jboss-profiler
                09:01:11,308 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/jboss-profiler'
                09:01:22,503 INFO [TomcatDeployment] undeploy, ctxPath=/jboss-profiler
                09:01:22,582 ERROR [WebBeansWebUrlIntegrationDeployer] Error during undeploy: vfszip:/home/jews/jboss-5.1.0.GA/server/default/deploy/jboss-profiler.war/
                java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
                 at org.jboss.virtual.plugins.context.AbstractExceptionHandler.handleZipEntriesInitException(AbstractExceptionHandler.java:39)
                 at org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler.handleZipEntriesInitException(NamesExceptionHandler.java:63)
                 at org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:616)
                 at org.jboss.virtual.plugins.context.zip.ZipEntryContext.checkIfModified(ZipEntryContext.java:763)
                 at org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(ZipEntryContext.java:807)
                 at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.createChildHandler(ZipEntryHandler.java:191)
                 at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:684)
                 at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:165)
                 at org.jboss.virtual.plugins.context.DelegatingHandler.getChild(DelegatingHandler.java:107)
                 at org.jboss.virtual.VirtualFile.getChild(VirtualFile.java:481)
                 at org.jboss.deployers.vfs.plugins.structure.VFSDeploymentResourceLoaderImpl.getFile(VFSDeploymentResourceLoaderImpl.java:62)
                 at org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext.getFile(AbstractVFSDeploymentContext.java:352)
                 at org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentUnit.getFile(AbstractVFSDeploymentUnit.java:101)
                 at org.jboss.deployers.vfs.plugins.classloader.PathUrlIntegrationDeployer.isIntegrationDeployment(PathUrlIntegrationDeployer.java:48)
                 at org.jboss.deployers.vfs.plugins.classloader.UrlIntegrationDeployer.isIntegrationDeployment(UrlIntegrationDeployer.java:183)
                 at org.jboss.deployers.vfs.plugins.classloader.UrlIntegrationDeployer.undeploy(UrlIntegrationDeployer.java:143)
                 at org.jboss.deployers.vfs.spi.deployer.AbstractOptionalVFSRealDeployer.undeploy(AbstractOptionalVFSRealDeployer.java:76)
                 at org.jboss.deployers.spi.deployer.helpers.AbstractOptionalRealDeployer.internalUndeploy(AbstractOptionalRealDeployer.java:91)
                 at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
                 at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:196)
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1469)
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1376)
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1331)
                 at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
                 at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1664)
                 at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1275)
                 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
                 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:694)
                 at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)
                 at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
                 at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:338)
                 at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:231)
                 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
                 at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
                 at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:146)
                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:170)
                 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
                 at java.lang.Thread.run(Thread.java:595)
                Caused by: java.util.zip.ZipException: error in opening zip file
                 at java.util.zip.ZipFile.open(Native Method)
                 at java.util.zip.ZipFile.<init>(ZipFile.java:203)
                 at java.util.zip.ZipFile.<init>(ZipFile.java:234)
                 at org.jboss.virtual.plugins.context.zip.ZipFileWrapper.ensureZipFile(ZipFileWrapper.java:175)
                 at org.jboss.virtual.plugins.context.zip.ZipFileWrapper.acquire(ZipFileWrapper.java:245)
                 at org.jboss.virtual.plugins.context.zip.ZipEntryContext.initEntries(ZipEntryContext.java:474)
                 at org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:609)
                 ... 39 more
                09:01:24,213 INFO [TomcatDeployment] deploy, ctxPath=/jboss-profiler
                


                • 5. Re: Hot-deployment on AS 5.x
                  jesper.pedersen

                  I use Linux, so it is problem on all platforms I guess...

                  And I havn't seen this with 4.2.4.GA...

                  • 6. Re: Hot-deployment on AS 5.x
                    jesper.pedersen

                    Just for the record - the original trace I got was https://jira.jboss.org/jira/browse/JBVFS-112

                    • 7. Re: Hot-deployment on AS 5.x
                      jaikiran

                      Moving our email discussion to the forum.

                      Jesper, me and Emanuel were seeing a JVM crash when the application was hot-deployed in a tight loop. This issue (the JVM crash and neither the IOException) does not occur in AS-4.2.x (not yet sure why) but appears to be happening in AS-5. Here's some details:

                      "Jesper" wrote:

                      Jesper Pedersen wrote:
                      > Hey.
                      >
                      > Repository information:
                      >
                      > svn co https://svn.jboss.org/repos/jbossprofiler/branches/JBossProfiler2
                      > ant clean web
                      > cp dist/jboss-profiler.war AS5/deploy
                      >
                      > and surf to:
                      >
                      > localhost:8080/jboss-profiler/index.xhtml
                      >
                      > Just keep deploying the .WAR file in tight loop
                      >
                      > Best regards,
                      > Jesper
                      >


                      "jaikiran" wrote:

                      I have managed to narrow this down to the VFS handling of ZipFile(entries). Having said that, i would not have expected the JVM to crash, but throw an IOException (as you first reported in the JIRA). Here's what's happening:

                      1) HDScanner picks up the archived deployment (.war)
                      2) VFS starts temping this by extracting the contents of the .war (ZipEntryHandler class). Internally it opens a InputStream for the zip entries.
                      3) When this processing is in progress, if we hot deploy the .war again, the InputStream that VFS is processing on, becomes stale (and ideally should throw IOException).
                      4) Finally the error.

                      Just to check whether i was guessing this right, i deployed the .war in exploded format and i could see that it moved past this and failed a bit later where VFS tried to work on the WEB-INF/lib/*.jar entries (the same zip entry processing logic with the InputStream). It failed with the same JVM crash here too.

                      So finally just to test, i removed all the jars from the lib folder, updated the web.xml to just contain the welcome-file section and deployed the war in exploded format. All this to ensure that no zip file processing happens. After this, i can successfully deploy this application in a tight loop without any issues - but obviously, this application is now of no use without any of its functionalities :)

                      Now that it's been tracked down to the zip file handling, i am going to see how JBossAS-4.x handles this, since we don't see this issue there.

                      P.S: The java dump during the crash helped in narrowing down this issue:

                      When deployed as archive :
                      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
                      J java.nio.Bits.copyToByteArray(JLjava/lang/Object;JJ)V
                      J java.nio.DirectByteBuffer.get([BII)Ljava/nio/ByteBuffer;
                      J java.io.FilterInputStream.read([B)I
                      J org.jboss.virtual.plugins.context.zip.ZipEntryInputStream.read([B)I
                      v ~I2CAdapter
                      j org.jboss.virtual.VFSUtils.copyStream(Ljava/io/InputStream;Ljava/io/OutputStream;)V+53
                      j org.jboss.virtual.VFSUtils.copyStreamAndClose(Ljava/io/InputStream;Ljava/io/OutputStream;)V+2
                      v ~C2IAdapter
                      J org.jboss.virtual.plugins.context.zip.ZipEntryContext.initEntries()V
                      v ~I2CAdapter
                      j org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries()V+19
                      v ~C2IAdapter
                      J org.jboss.virtual.plugins.context.zip.ZipEntryContext.checkIfModified()V
                      J org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(Lorg/jboss/virtual/plugins/context/zip/ZipEntryHandler;Ljava/lang/String;)Lorg/jboss/virtual/spi/VirtualFileHandler;
                      J org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(Ljava/lang/String;)Lorg/jboss/virtual/spi/VirtualFileHandler;
                      J org.jboss.virtual.VirtualFile.getChild(Ljava/lang/String;)Lorg/jboss/virtual/VirtualFile;
                      v ~I2CAdapter
                      j org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure.determineStructure(Lorg/jboss/deployers/vfs/spi/structure/StructureContext;)Z+56
                      




                      When deployed in exploded format (and internally processing *.jar in the lib of WEB-INF):
                      J java.util.zip.ZipFile.getEntry(JLjava/lang/String;Z)J
                      J java.util.zip.ZipFile.getInputStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;
                      J org.jboss.virtual.plugins.context.zip.ZipFileWrapper.openStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;
                      J org.jboss.virtual.plugins.context.zip.ZipEntryHandler.openStream()Ljava/io/InputStream;
                      J org.jboss.classloading.plugins.vfs.VFSResourceContext.getInputStream()Ljava/io/InputStream;
                      J org.jboss.deployers.plugins.annotations.GenericAnnotationResourceVisitor.visit(Lorg/jboss/classloading/spi/visitor/ResourceContext;)V
                      J org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(Lorg/jboss/virtual/VirtualFile;)V
                      J org.jboss.virtual.plugins.vfs.helpers.WrappingVirtualFileHandlerVisitor.visit(Lorg/jboss/virtual/spi/VirtualFileHandler;)V
                      J org.jboss.virtual.plugins.context.AbstractVFSContext.visit(Lorg/jboss/virtual/spi/VirtualFileHandler;Lorg/jboss/virtual/spi/VirtualFileHandlerVisitor;ZZZZLorg/jboss/virtual/VirtualFileFilter;)V
                      J org.jboss.virtual.plugins.context.AbstractVFSContext.visit(Lorg/jboss/virtual/spi/VirtualFileHandler;Lorg/jboss/virtual/spi/VirtualFileHandlerVisitor;ZZZZLorg/jboss/virtual/VirtualFileFilter;)V
                      J org.jboss.virtual.plugins.context.AbstractVFSContext.visit(Lorg/jboss/virtual/spi/VirtualFileHandler;Lorg/jboss/virtual/spi/VirtualFileHandlerVisitor;ZZZZLorg/jboss/virtual/VirtualFileFilter;)V
                      








                      • 8. Re: Hot-deployment on AS 5.x
                        alesj
                        • 9. Re: Hot-deployment on AS 5.x
                          jaikiran

                           

                          "alesj" wrote:
                          I might be this? https://jira.jboss.org/jira/browse/JBAS-6773

                          Looks similar. Shelly mentions in that issue that it works on JRockit, so let me give it a try against that and see what the behaviour is.


                          • 10. Re: Hot-deployment on AS 5.x
                            jaikiran

                            JRockit handles this better - it does not crash and throws this exception which is expected:

                            org.jboss.deployers.spi.DeploymentException: Failed to create web module
                             at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:447)
                             at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:84)
                             at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                             at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                             at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
                             at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
                             at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
                             at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
                             at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                             at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                             at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                             at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
                             at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
                             at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:338)
                             at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:231)
                             at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
                             at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
                             at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
                             at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
                             at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
                             at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
                             at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
                             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
                             at java.lang.Thread.run(Thread.java:595)
                            Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
                             at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:216)
                             at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:134)
                             at java.util.zip.ZipInputStream.read(ZipInputStream.java:139)
                             at java.util.jar.JarInputStream.read(JarInputStream.java:171)
                             at org.jboss.util.file.JarUtils.unjar(JarUtils.java:301)
                             at org.jboss.virtual.plugins.copy.AbstractCopyMechanism.unjar(AbstractCopyMechanism.java:320)
                             at org.jboss.virtual.plugins.copy.UnjarCopyMechanism.doCopy(UnjarCopyMechanism.java:52)
                             at org.jboss.virtual.plugins.copy.AbstractCopyMechanism.copy(AbstractCopyMechanism.java:176)
                             at org.jboss.virtual.plugins.copy.AbstractCopyMechanism.copy(AbstractCopyMechanism.java:135)
                             at org.jboss.virtual.VFSUtils.copy(VFSUtils.java:871)
                             at org.jboss.virtual.VFSUtils.unjar(VFSUtils.java:852)
                             at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:346)
                             ... 28 more
                            


                            • 11. Re: Hot-deployment on AS 5.x
                              nithyas


                              I am facing the same issue.
                              I am having a script doing a daily deployment/undeployment of the app.
                              For the first week, things were going fine.
                              Now startup/deployment fails with almost the same stacktrace

                              Any idea if this will this be fixed in the next release?

                              Deployment "ManagedConnectionFactoryDeployer" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup
                              Deployment "LocalTxDataSourceTemplateInfo" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData
                              Deployment "ManagedConnectionFactoryParserDeployer" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup
                              Deployment "NoTxConnectionFactoryTemplate" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData
                              Deployment "SeamDeployer" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.metadata.web.jboss.JBossWebMetaData from BaseClassLoader@35afe17b{VFSClassLoaderPolicy@2dfc6dc6{name=vfsfile:/export/isqa/jboss-5.1.0.CR1/server/default/deployers/seam.deployer/ domain=ClassLoaderDomain@317cfd38{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@13d4c61c} roots=[MemoryContextHandler@394983872[path= context=vfsmemory://5ci1z33-psibf2-fupups8k-1-fupuq5p5-e real=vfsme.....

                              • 12. Re: Hot-deployment on AS 5.x
                                jaikiran

                                 

                                Deployment "ManagedConnectionFactoryDeployer" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup
                                Deployment "LocalTxDataSourceTemplateInfo" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData
                                Deployment "ManagedConnectionFactoryParserDeployer" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup
                                Deployment "NoTxConnectionFactoryTemplate" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData
                                Deployment "SeamDeployer" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.metadata.web.jboss.JBossWebMetaData from BaseClassLoader@35afe17b{VFSClassLoaderPolicy@2dfc6dc6{name=vfsfile:/export/isqa/jboss-5.1.0.CR1/server/default/deployers/seam.deployer/ domain=ClassLoaderDomain@317cfd38{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@13d4c61c} roots=[MemoryContextHandler@394983872[path= context=vfsmemory://5ci1z33-psibf2-fupups8k-1-fupuq5p5-e real=vfsme.....


                                This does not look like the same issue. Can you please create a separate thread in the JBoss AS5 forum http://www.jboss.org/index.html?module=bb&op=viewforum&f=287. When you create the thread there, please provide more details including the exact version of JBossAS, the version and vendor of Java and the entire exception stacktrace. Also please provide more details about how you deploy/undeploy/redeploy.

                                While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.