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.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.2.1.6, 10.3.1.4
    • Fix Version/s: 10.11.1.1
    • Component/s: Test
    • Urgency:
      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.

      1. d2162-1a.diff
        17 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Myrna van Lunteren made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Knut Anders Hatlen made changes -
          Component/s Test [ 11413 ]
          Component/s Services [ 11415 ]
          Knut Anders Hatlen made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Issue & fix info Patch Available [ 10102 ]
          Fix Version/s 10.11.0.0 [ 12324243 ]
          Resolution Fixed [ 1 ]
          Knut Anders Hatlen made changes -
          Issue & fix info Patch Available [ 10102 ]
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Knut Anders Hatlen made changes -
          Attachment d2162-1a.diff [ 12636890 ]
          Knut Anders Hatlen made changes -
          Assignee Knut Anders Hatlen [ knutanders ]
          Knut Anders Hatlen made changes -
          Link This issue is duplicated by DERBY-5618 [ DERBY-5618 ]
          Gavin made changes -
          Workflow jira [ 12391823 ] Default workflow, editable Closed status [ 12798777 ]
          Kathey Marsden made changes -
          Labels derby_triage10_5_2
          Knut Anders Hatlen made changes -
          Urgency Normal
          Kathey Marsden made changes -
          Assignee Daniel John Debrunner [ djd ]
          Mike Matrigali made changes -
          Field Original Value New Value
          Component/s Services [ 11415 ]
          Daniel John Debrunner created issue -

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Daniel John Debrunner
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development