Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
deploymentadmin-0.9.0
-
None
-
None
-
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: C:\Program Files\Apache Maven\apache-maven-3.0.4
Java version: 1.7.0_02, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_02\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100) Maven home: C:\Program Files\Apache Maven\apache-maven-3.0.4 Java version: 1.7.0_02, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.7.0_02\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Description
DeploymentAdmin leaks a few inputstreams that cause it to fail on deletes and consequently the update. Attaching a patch that solves three possible cases:
1) ExplodingOutputtingInputStream#merge may hold a lock on the manifest file
2) UpdateCommand$UpdateBundleRunnable does not close its own stream (may be superfluous though)
3) DropBundleCommand$InstallBundleRunnable gets past an inpustream but does not close it (an may never even run). This one caused the error below.
[Error] [ ] Could not merge source fix package with target deployment package java.io.IOException: Could not delete .\felix-cache\bundle0\packages\bram2\contents\org.amdatu.multitenant.org.ops4j.pax.useradmin.pax-useradmin-service-1.0.0-RC3.jar at org.apache.felix.deploymentadmin.ExplodingOutputtingInputStream.merge(ExplodingOutputtingInputStream.java:310) at org.apache.felix.deploymentadmin.DeploymentAdminImpl.installDeploymentPackage(DeploymentAdminImpl.java:229) at org.apache.ace.deployment.deploymentadmin.DeploymentAdminDeployer.install(DeploymentAdminDeployer.java:51) at org.apache.ace.deployment.service.impl.DeploymentServiceImpl.installVersion(DeploymentServiceImpl.java:120) at org.apache.ace.deployment.task.DeploymentUpdateTask.run(DeploymentUpdateTask.java:57) at org.apache.ace.scheduler.Executer.run(Executer.java:92) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) [Error] [ ] Error installing update