Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-3526

DeploymentAdmin fails on windows due to unclosed iostreams

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • deploymentadmin-0.9.0
    • None
    • Deployment Admin
    • None

    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
      

      ref: http://jira.amdatu.org/jira/browse/AMDATU-693

      Attachments

        1. FELIX-3526-closeStreams.patch
          10 kB
          Bram de Kruijff

        Activity

          People

            Unassigned Unassigned
            bramk Bram de Kruijff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: