Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2162

Shutting down a database loaded from a jar file via the classpath and URLClassLoader leaves an open file reference to the jar file containing the database.

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.2.1.6, 10.3.1.4
    • 10.11.1.1
    • Test
    • Normal

    Description

      A bug in java.net.URLClassLoader causes the underlying jar file to be held open once a resource has been fetched and opened.
      Loading a class or just accessing the URL for the resource does not keep the jar open. Reported the bug to Sun, it is similar to the existing bug Java bug 4950148 but in this case no amount of garbage collection will close the jar.

      Derby exposes this as all containers/files are opened using as resources when loading the database from the classpath.

      On windows this is seen as the inability to delete the jar file, seen by the fixture testDatabaseInClasspath in DatabaseClassLoadingTest.

      Similar to DERBY-2083 but due to a different cause.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            knutanders Knut Anders Hatlen
            djd Daniel John Debrunner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment