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

JDBC3 driver is loaded instead of JDBC4 when running with jdk1.7

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.2.2.0
    • 10.2.2.1, 10.3.1.4
    • JDBC
    • None
    • jdk1.7

    Description

      When running tests with jdk1.7 I discovered that the test harness used 1.6 master files and tested JDBC4 functionality, but Derby loaded a JDBC3 driver, causing a lot of failures.

      The problem is caused by code in engine/org/apache/derby/iapi/services/info/JVMInfo.java that controls what version of JDBC to use, based on the version of java that the jvm is running. A check at the end seems to be intended to make sure that Derby is compatible with future jdk versions, but it is outdated and makes sure that any "unknown" jvm newer than 1.4 uses JDBC3. The check should be changed to make sure that any jvm newer than 1.6 uses JDBC4:

      • if (Float.valueOf(javaVersion).floatValue() > 1.4f)
      • id = 5;
        + if (Float.valueOf(javaVersion).floatValue() > 1.6f)
        + id = J2SE_16;

      Attachments

        1. 2279-diff
          0.5 kB
          Vemund Østgaard
        2. 2279-diff.stat
          0.1 kB
          Vemund Østgaard

        Activity

          People

            vemund Vemund Østgaard
            vemund Vemund Østgaard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: