Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-5622

Update of bundle file on Windows fails with "Could not remove temporary directory" error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: OpenIDM 4.5.0
    • Fix Version/s: OpenIDM 5.0.0
    • Component/s: _Update
    • Environment:
      OpenIDM version "4.1.0-SNAPSHOT" (revision: 3b00e76)
    • Sprint:
      OpenIDM Sprint 59
    • Story Points:
      5

      Description

      Step to reproduce the problem on Windows:

      • unzip OpenIDM
      • remove conf/workflow.json so that workflow is disabled
      • launch OpenIDM
        ./startup.bat
        
      • copy update_with_one_bundle_updated.zip in bin/update (this ZIP contains bundle/openidm-workflow-activiti-9.9.0-SNAPSHOT.jar)(find the ZIP in attachment)
      • launch update:
        update --acceptLicense --user openidm-admin:openidm-admin --url http://localhost:8080/openidm/ update_with_one_bundle_updated.zip
        
      • The update fails with this error in the console:
        License was accepted via command line argument.
        Pausing the Scheduler
        Scheduler has been paused.
        Waiting for running jobs to finish.
        All running jobs have finished.
        Entering into maintenance mode...
        Now in maintenance mode.
        Installing the update archive update_with_one_bundle_updated.zip
        Update procedure is still processing...
        The update process is complete with a status of FAILED
        Exiting maintenance mode...
        No longer in maintenance mode.
        Resuming the job scheduler.
        Scheduler has been resumed
        

        and in the log we find this error:

        Apr 14, 2016 4:37:25 PM org.forgerock.openidm.maintenance.upgrade.UpdateManagerImpl$ZipArchive <init>
        INFO: Archive does not contain a product version; Assumed to be a patch.
        Apr 14, 2016 4:37:25 PM org.forgerock.openidm.maintenance.upgrade.UpdateManagerImpl$UpdateThread run
        SEVERE: Could not remove temporary directory: C:\Users\ADMINI~1.IDM\AppData\Local\Temp\openidm-update-923967582556522542
        java.io.IOException: Unable to delete file: C:\Users\ADMINI~1.IDM\AppData\Local\Temp\openidm-update-923967582556522542\openidm\bundle\openidm-workflow-activiti-9.9.0-SNAPSHOT.jar
        	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2279)
        	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
        	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
        	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
        	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
        	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
        	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
        	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
        	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
        	at org.forgerock.openidm.maintenance.upgrade.UpdateManagerImpl$UpdateThread.run(UpdateManagerImpl.java:1028)
        

      Maybe we should 'unlock' this file before deleting it.
      Or maybe just go on with the update even if we are not able to delete the temp file.

        Attachments

          Activity

            People

            • Assignee:
              joy.feng Joy Feng [X] (Inactive)
              Reporter:
              laurent.bristiel Laurent Bristiel
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: