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

Loading databases from jars in the classpath is broken, databases cannot be found.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.1.0
    • Fix Version/s: 10.1.2.1, 10.2.1.6
    • Component/s: Store
    • Labels:
      None

      Description

      In converting an old Cloudscape test to ensure changes made for DERBY-538 would not break loading from classes stored in the database when the database itself is in a jar, I discovered that a database cannot be found that is in a jar on the classpath.
      Discovered the reason is the StoreFactory implementation for classpath always prepends a leading foward slash to the database name, but this is incorrect (e.g. db7 to /db7). This causes the database not to be found when the classloader is URLClassLoader as the correct path for the service.properties file is db7/services.properties, not /db7/services.properties.

      Will add converted test (lang/dbjar.sql)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                djd Daniel John Debrunner
                Reporter:
                djd Daniel John Debrunner
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: