Issue Details (XML | Word | Printable)

Key: DERBY-668
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Bryan Pendleton
Reporter: Bryan Pendleton
Votes: 0
Watchers: 0
Operations

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

SysInfo does not print the right information when Derby is not loaded through the classpath.

Created: 02/Nov/05 07:16 AM   Updated: 09/Aug/06 06:41 AM
Return to search
Component/s: Build tools
Affects Version/s: 10.1.1.0
Fix Version/s: 10.2.1.6

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works derby-668-2.diff 2005-11-24 07:31 AM Bryan Pendleton 4 kB
File Licensed for inclusion in ASF works derby-668-3.diff 2005-12-01 07:18 AM Bryan Pendleton 4 kB
File Licensed for inclusion in ASF works derby-668-4.diff 2005-12-03 06:19 AM Bryan Pendleton 4 kB
File Licensed for inclusion in ASF works Derby-668.diff 2005-11-07 03:35 AM Bryan Pendleton 1 kB
File Licensed for inclusion in ASF works sysinfo_Feb27_2006.diff 2006-02-28 05:13 AM Bryan Pendleton 5 kB
File Licensed for inclusion in ASF works sysinfo_Feb28_2006.diff 2006-03-01 01:45 PM Bryan Pendleton 5 kB
File Licensed for inclusion in ASF works with_andrews_feedback.diff 2006-03-12 11:00 AM Bryan Pendleton 6 kB
Issue Links:
Reference

Issue & fix info: Release Note Needed
Resolution Date: 22/Mar/06 02:39 AM


 Description  « Hide
There is a section in the SysInfo tool's output titled "Derby Information", which prints location and version information for the major Derby jars. Here is an example of that output:

--------- Derby Information --------
JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
[/home/bpendleton/src/derby-subversion/trunk/jars/insane/derby.jar] 10.2.0.0 alpha - (315052M)
[/home/bpendleton/src/derby-subversion/trunk/jars/insane/derbytools.jar] 10.2.0.0 alpha - (315052M)
[/home/bpendleton/src/derby-subversion/trunk/jars/insane/derbynet.jar] 10.2.0.0 alpha - (315052M)
[/home/bpendleton/src/derby-subversion/trunk/jars/insane/derbyclient.jar] 10.2.0.0 alpha - (315052M)
[/home/bpendleton/downloads/derby/db2jcc/lib/db2jcc.jar] 2.4 - (17)
[/home/bpendleton/downloads/derby/db2jcc/lib/db2jcc_license_c.jar] 2.4 - (17)

Unfortunately, this tool can be fooled if you arrange for one of these jar files to be loaded from a magic location like $JAVA_HOME/jre/lib/ext.

For example, I had (accidentally) placed an old version of db2jcc.jar into $JAVA_HOME/jre/lib/ext. When I ran SysInfo, it printed out:

--------- Derby Information --------
JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
[/home/bpendleton/src/derby-subversion/trunk/jars/insane/derby.jar] 10.2.0.0 alpha - (315052M)
[/home/bpendleton/src/derby-subversion/trunk/jars/insane/derbytools.jar] 10.2.0.0 alpha - (315052M)
[/home/bpendleton/src/derby-subversion/trunk/jars/insane/derbynet.jar] 10.2.0.0 alpha - (315052M)
[/home/bpendleton/src/derby-subversion/trunk/jars/insane/derbyclient.jar] 10.2.0.0 alpha - (315052M)
[/home/bpendleton/downloads/derby/db2jcc/lib/db2jcc.jar] 1.0 - (581)
[/home/bpendleton/downloads/derby/db2jcc/lib/db2jcc_license_c.jar] 1.0 - (581)

However, the "1.0 (581)" information actually came from $JAVA_HOME/jre/lib/ext/db2jcc.jar, NOT from
/home/bpendleton/downloads/derby/db2jcc/lib/db2jcc.jar.

It would be nice if SysInfo could detect the difference between a jar file being loaded via the application class loader using $CLASSPATH, and a jar file being loaded via the system class loader using JDK library extensions.

To reproduce the problem, simply:
1) Place an older version of db2jcc.jar into $JAVA_HOME/jre/lib/ext
2) Place a newer version of db2jcc.jar into your $CLASSPATH
3) Run SysInfo. You will see that it prints the name of the jarfile from $CLASSPATH, but the version info from the JDK copy.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.