FULL PRODUCT VERSION :
java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b0
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_0
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
EXTRA RELEVANT SYSTEM CONFIGURATION :
We use jdbc_rowset_tiger1.0.1mrel-ri as 1.4.2 rowset package
A DESCRIPTION OF THE PROBLEM :
We had to find out the hard way that none of the CachedRowSetImpl reference implementations for pre1.5 jdks (our case: 1.4.2_08) (even though named tiger) are compatible with the one bundled in jdk1.5. We therefore cannot easily update our clients to 1.5 untill the application server also updates to 1.5 which is a big problem for us. The problem could be easily fixed by publishing a compatible RowSet implementation package for pre-1.5 jdks.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
please find appended a tarball containing a source demonstaating the error and the used reference implementation jdbc_rowset_tiger1.0.1mrel-ri for 1.4.2 - it is the actual one you can also find on the java.sun.com/products/jdbc homepage. The 1.4.2_xx sub-version is not important as the serialized class is located in the described jar. For jdk1.5 I used the most actual _05 version when writing this example. The crash is happening as described in the bug report.
First launch the demo with 1.4.2 (rowset.jar must be included as it is not part of the standard distribution):
<path to your 1.4.2 jdk>\bin\java -cp .;rowset.jar CachedRowSetImplBugDemo
If you have run the demo before you should say 'y' to overwrite any existing serialized file.
Then, launch the same demo with jdk1.5 and without the rowset.jar (as this is part of 1.5):
<path to your 1.5 jdk>\bin\java -cp . CachedRowSetImplBugDemo
This time make sure to answer no to the overwrite question - this will read the previously written serialized file.
You should see an java.io.InvalidClassException error. Of course you can do the opposite, write with 1.5 and read with 1.4 to get a similar error.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Analog to the e.g. Collections framework classes there should be no serializing incompatibility in the jdbc package between versions as this forces one to use the same jdk for servers and clients and so drastically reduces the usability of these classes.
ACTUAL -
The transfer attempt crashes with the given stacktrace.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.io.InvalidClassException: javax.sql.rowset.RowSetMetaDataImpl$ColInfo; local class incompatible: stream classdesc serialVersionUID = 4431284943651249319, local class serialVersionUID = 5490834817919311283
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:139)
... 30 more
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b0
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_0
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
EXTRA RELEVANT SYSTEM CONFIGURATION :
We use jdbc_rowset_tiger1.0.1mrel-ri as 1.4.2 rowset package
A DESCRIPTION OF THE PROBLEM :
We had to find out the hard way that none of the CachedRowSetImpl reference implementations for pre1.5 jdks (our case: 1.4.2_08) (even though named tiger) are compatible with the one bundled in jdk1.5. We therefore cannot easily update our clients to 1.5 untill the application server also updates to 1.5 which is a big problem for us. The problem could be easily fixed by publishing a compatible RowSet implementation package for pre-1.5 jdks.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
please find appended a tarball containing a source demonstaating the error and the used reference implementation jdbc_rowset_tiger1.0.1mrel-ri for 1.4.2 - it is the actual one you can also find on the java.sun.com/products/jdbc homepage. The 1.4.2_xx sub-version is not important as the serialized class is located in the described jar. For jdk1.5 I used the most actual _05 version when writing this example. The crash is happening as described in the bug report.
First launch the demo with 1.4.2 (rowset.jar must be included as it is not part of the standard distribution):
<path to your 1.4.2 jdk>\bin\java -cp .;rowset.jar CachedRowSetImplBugDemo
If you have run the demo before you should say 'y' to overwrite any existing serialized file.
Then, launch the same demo with jdk1.5 and without the rowset.jar (as this is part of 1.5):
<path to your 1.5 jdk>\bin\java -cp . CachedRowSetImplBugDemo
This time make sure to answer no to the overwrite question - this will read the previously written serialized file.
You should see an java.io.InvalidClassException error. Of course you can do the opposite, write with 1.5 and read with 1.4 to get a similar error.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Analog to the e.g. Collections framework classes there should be no serializing incompatibility in the jdbc package between versions as this forces one to use the same jdk for servers and clients and so drastically reduces the usability of these classes.
ACTUAL -
The transfer attempt crashes with the given stacktrace.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.io.InvalidClassException: javax.sql.rowset.RowSetMetaDataImpl$ColInfo; local class incompatible: stream classdesc serialVersionUID = 4431284943651249319, local class serialVersionUID = 5490834817919311283
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:139)
... 30 more
REPRODUCIBILITY :
This bug can be reproduced always.