Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-1652

Cannot hot-install a PEAR twice

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Abandoned
    • 2.2.2
    • None
    • Tools
    • Windows

    Description

      Due to a java bug "URLClassLoader.getResourceAsStream locks jar files"
      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041014
      When you use PackageInstaller.installPackage(installDir, pearFile, true, true); twice from an application because you want to hot-redeploy a new version of a PEAR, you have an error:
      java.io.IOException: Error while trying to clean the installation directory MyPearDir
      at org.apache.uima.pear.tools.InstallationController.extractFilesFromPEARFile(InstallationController.java:742)
      at org.apache.uima.pear.tools.InstallationController.extractPEARFile(InstallationController.java:854)
      at org.apache.uima.pear.tools.InstallationController.installComponent(InstallationController.java:1551)
      at org.apache.uima.pear.tools.PackageInstaller.installPackage(PackageInstaller.java:171)

      A patch is proposed in this article
      http://management-platform.blogspot.com/2009/01/classloaders-keeping-jar-files-open.html

      I have implemented it modifying the UIMAClassLoader and the InstallationTester classes and it works

      I can submit a patch if you find it usefull

      Attachments

        1. uimaj-core_UIMA-1652.patch
          6 kB
          Olivier Terrier

        Issue Links

          Activity

            People

              Unassigned Unassigned
              oterrier Olivier Terrier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: