Deployment plans do not properly undeploy when JOnAS path has spaces
Deployment plans do not properly undeploy when JOnAS path has spaces.
To see the issue, follow these steps:
Start JOnAS from a path with spaces, for example C:\Program Files\JOnAS 5.2.2
Copy the attached deployment plan into the deploy directory. It works nicely:
{noformat} 2011-12-18 17:15:09,200 : Maven2ResourceFetcher.resolveArtifact : Downloading simple-war-1.1.4.war (2Ko) 2011-12-18 17:15:09,433 : WARDeployer.doDeploy : Deploying simple-war-1.1.4.war 2011-12-18 17:15:10,261 : BaseWebContainerService.registerWar : War simple-war-1.1.4.war available at the context /simple-war-1.1.4. {noformat}
Move the deployment plan somewhere else. It seems to undeploy nicely:
{noformat} 2011-12-18 17:15:35,619 : DeployableMonitor.checkModifiedDeployables : Deployable 'DeploymentPlanDeployableImpl[archive=/C/Program Files/JOnAS 5.2.2/deploy/cargo-sample-war.xml]' has been removed on the filesystem, undeploy it 2011-12-18 17:15:35,621 : WARDeployer.doUndeploy : Undeploying simple-war-1.1.4.war {noformat}
Now, move it again to deploy; and JOnAS deployer goes crazy:
{noformat} 2011-12-18 17:15:51,064 : WARDeployer.doDeploy : Deploying simple-war-1.1.4.war 2011-12-18 17:15:51,066 : DeployableMonitor.detectNewArchives : DeployerException : Cannot deploy the deployable 'DeploymentPlanDeployableImpl[archive=/C/Program Files/JOnAS 5.2.2/deploy/cargo-sample-war.xml]' org.ow2.util.ee.deploy.api.deployer.DeployerException: Deployment plan deployment failed at org.ow2.util.plan.deployer.impl.DeploymentPlanDeployer.deploy(DeploymentPlanDeployer.java:154) at org.ow2.util.ee.deploy.impl.deployer.DeployerManager.deploy(DeployerManager.java:148) at org.ow2.jonas.deployablemonitor.DeployableMonitor.detectNewArchives(DeployableMonitor.java:491) at org.ow2.jonas.deployablemonitor.DeployableMonitor.checkNewArchives(DeployableMonitor.java:306) at org.ow2.jonas.deployablemonitor.DeployableMonitor.run(DeployableMonitor.java:216) Caused by: org.ow2.util.plan.deployer.api.DeploymentPlanDeploymentException: Error while deploying part Maven2Deployment[org.codehaus.cargo:simple-war:war, reloadable=false, useRepository=] of deployment plan org.ow2.util.plan.bindings.deploymentplan.DeploymentPlan@698c6916 at org.ow2.util.plan.deployer.impl.DeploymentPlanDeployer.deployDeploymentPlan(DeploymentPlanDeployer.java:278) at org.ow2.util.plan.deployer.impl.DeploymentPlanDeployer.deploy(DeploymentPlanDeployer.java:152) ... 4 more Caused by: org.ow2.util.plan.deployer.api.FragmentDeploymentException: Exception while deploying deployable WARDeployableImpl[archive=/C/Program Files/JOnAS 5.2.2/repositories/maven2-central/org/codehaus/cargo/simple-war/1.1.4/simple-war-1.1.4.war] at org.ow2.util.plan.deployer.impl.DeploymentPlanDeployer.deployDeployment(DeploymentPlanDeployer.java:377) at org.ow2.util.plan.deployer.impl.DeploymentPlanDeployer.deployDeploymentPlan(DeploymentPlanDeployer.java:260) ... 5 more Caused by: org.ow2.util.ee.deploy.api.deployer.DeployerException: Cannot deploy the War deployable 'WARDeployableImpl[archive=/C/Program Files/JOnAS 5.2.2/repositories/maven2-central/org/codehaus/cargo/simple-war/1.1.4/simple-war-1.1.4.war]'. at org.ow2.jonas.web.base.WARDeployer.doDeploy(WARDeployer.java:72) at org.ow2.util.ee.deploy.impl.deployer.AbsDeployer$1.execute(AbsDeployer.java:93) at org.ow2.util.ee.deploy.impl.deployer.AbsDeployer$1.execute(AbsDeployer.java:91) at org.ow2.util.execution.helper.RunnableHelper.execute(RunnableHelper.java:77) at org.ow2.util.ee.deploy.impl.deployer.AbsDeployer.deploy(AbsDeployer.java:91) at org.ow2.util.ee.deploy.impl.deployer.DeployerManager.deploy(DeployerManager.java:148) at org.ow2.util.plan.deployer.impl.DeploymentPlanDeployer.deployDeployment(DeploymentPlanDeployer.java:375) ... 6 more Caused by: org.ow2.jonas.web.base.proxy.HttpOnDemandProxyException: Unable to deploy the war file 'WARDeployableImpl[archive=/C/Program Files/JOnAS 5.2.2/repositories/maven2-central/org/codehaus/cargo/simple-war/1.1.4/simple-war-1.1.4.war]'. at org.ow2.jonas.web.base.proxy.HttpOnDemandProxy.addWar(HttpOnDemandProxy.java:354) at org.ow2.jonas.web.base.WARDeployer.doDeploy(WARDeployer.java:70) ... 12 more Caused by: org.ow2.jonas.web.JWebContainerServiceException : Cannot deploy war '/C/Program%20Files/JOnAS%205.2.2/repositories/maven2-central/org/codehaus/cargo/simple-war/1.1.4/simple-war-1.1.4.war' is already deployed. You must undeploy the war before a new deployment. at org.ow2.jonas.web.base.BaseWebContainerService.registerWar(BaseWebContainerService.java:689) at org.ow2.jonas.web.base.BaseWebContainerService.registerWar(BaseWebContainerService.java:1257) at org.ow2.jonas.web.base.proxy.HttpOnDemandProxy.addWar(HttpOnDemandProxy.java:352) ... 13 more {noformat}