Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7790

Undeployment of an .ear through HDScanner leads to a deploy() call on the deleted deployment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 6.0.0.M3
    • Component/s: ProfileService
    • Labels:
      None
    • Environment:

      JBoss AS trunk r102035

      Description

      On the current AS trun (r102035):

      • Start the "default" profile of the server with a .ear file in the deploy folder
      • Once the server has completely started, delete the .ear from the deploy folder
      • HDScanner is triggered and it undeploys the deleted .ear but also triggers a deploy on this deleted .ear which results in:

      19:54:18,225 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Parse: name=file:///NotBackedUp/jpai/business/jboss/wc/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/server/default/deploy/jbas-7760-earone.ear state=PreParse mode=Manual requiredState=Parse: org.jboss.deployers.spi.DeploymentException: Error during deploy: file:///NotBackedUp/jpai/business/jboss/wc/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/server/default/deploy/jbas-7760-earone.ear
      at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1857)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1575)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1516)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:377)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1066)
      at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1305)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1229)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1122)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:649)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:2008)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1101)
      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:409)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.NullPointerException
      at org.jboss.deployment.EARContentsDeployer.deploy(EARContentsDeployer.java:149)
      at org.jboss.deployment.EARContentsDeployer.deploy(EARContentsDeployer.java:127)
      at org.jboss.deployment.EARContentsDeployer.deploy(EARContentsDeployer.java:115)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
      ... 26 more

      19:54:18,227 WARN [org.jboss.system.server.profileservice.hotdeploy.HDScanner] Failed to process changes: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

          • DEPLOYMENTS MISSING DEPLOYERS: Name

      file:///NotBackedUp/jpai/business/jboss/wc/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/server/default/deploy/jbas-7760-earone.ear

          • DEPLOYMENTS IN ERROR: Name -> Error

      file:///NotBackedUp/jpai/business/jboss/wc/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/server/default/deploy/jbas-7760-earone.ear -> org.jboss.deployers.spi.DeploymentException: Error during deploy: file:///NotBackedUp/jpai/business/jboss/wc/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/server/default/deploy/jbas-7760-earone.ear

      Notice that the NPE is triggered through the deploy() flow. A quick look at the code indicates that this is because the org.jboss.system.server.profileservice.repository.HotDeploymentRepository on a call to getModifiedDeployments() returns that .ear as both REMOVED as well as MODIFIED. It returns it as modified because the call to getModifiedDeployments() internally leads to checkForAdditions() method which uses a cached VirtualFile for the "deploy" folder. This cached VirtualFile returns the .ear as one of the deployments, even after the deployment has been removed.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                emuckenhuber Emanuel Muckenhuber
                Reporter:
                jaikiran Jaikiran Pai
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: