Issue Details (XML | Word | Printable)

Key: DERBY-2279
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vemund Østgaard
Reporter: Vemund Østgaard
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

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

Created: 31/Jan/07 10:59 AM   Updated: 25/Jan/08 01:17 PM
Return to search
Component/s: JDBC
Affects Version/s: 10.2.2.0
Fix Version/s: 10.2.2.1, 10.3.1.4

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works 2279-diff 2007-01-31 11:03 AM Vemund Østgaard 0.5 kB
File Licensed for inclusion in ASF works 2279-diff.stat 2007-01-31 11:03 AM Vemund Østgaard 0.1 kB
Environment: jdk1.7

Resolution Date: 31/Jan/07 01:42 PM


 Description  « Hide
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;


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #501833 Wed Jan 31 13:14:45 UTC 2007 kristwaa DERBY-2279: JDBC3 driver is loaded instead of JDBC4 when running with jdk1.7 (inthe old test harness).

Patch contributed by Vemund Østgaard.
Files Changed
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java

Repository Revision Date User Message
ASF #501841 Wed Jan 31 13:41:53 UTC 2007 kristwaa DERBY-2279: Merged from trunk.
Files Changed
MODIFY /db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java