[jboss-jira] [JBoss JIRA] Created: (JBAS-7790) Undeployment of an .ear through HDScanner leads to a deploy() call on the deleted deployment

jaikiran pai (JIRA) jira-events at lists.jboss.org
Sun Mar 7 10:29:05 EST 2010


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

                 Key: JBAS-7790
                 URL: https://jira.jboss.org/jira/browse/JBAS-7790
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: ProfileService
         Environment: JBoss AS trunk r102035
            Reporter: jaikiran pai
            Assignee: Scott M Stark


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list