JDK-6284126 : REGRESSION: some java.sql and javax.sql classes changed serialVersionUIDs due to CCC 6283686
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.sql
  • Affected Version: 1.5a,6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2005-06-10
  • Updated: 2012-03-23
  • Resolved: 2006-03-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b53Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
java.sql.SQLException was updated in mustang b39 as part of putback related to CCC request 6283686. 
A number of JCK tests must be updated to accomodate this change.

The following JCK1.5a tests fail on all platforms under mustang b39 due to this change:

api/java_sql/DataTruncation/serial/index.html#InputTests
api/javax_sql/rowset/RowSetWarning/serial/index.html#Input 
api/javax_sql/rowset/serial/SerialException/serial/index.html#Input
api/javax_sql/rowset/spi/SyncFactoryException/serial/index.html#Input
api/javax_sql/rowset/spi/SyncProviderException/serial/index.html#Input
api/java_sql/BatchUpdateException/serial/index.html#InputTests
api/java_sql/SQLException/serial/index.html#InputTests
api/java_sql/SQLWarning/serial/index.html#InputTests
api/java_sql/serialization/descriptions.html#DataTruncation
api/java_sql/serialization/descriptions.html#SQLException  
api/java_sql/serialization/descriptions.html#SQLWarning    

###@###.### 2005-06-10 19:06:33 GMT

Comments
EVALUATION Confirmed to have been fixed with b53. [sixnines:/export/home/amit/wsMustang/src/share/classes/java/sql] $ /java/re/jdk/6.0/promoted/all/b53/binaries/solaris-sparc/bin/serialver java.sql.BatchUpdateException java.sql.BatchUpdateException: static final long serialVersionUID = 5977529877145521757L; [sixnines:/export/home/amit/wsMustang/src/share/classes/java/sql] $ /java/re/jdk/6.0/promoted/all/b52/binaries/solaris-sparc/bin/serialver java.sql.BatchUpdateException java.sql.BatchUpdateException: static final long serialVersionUID = -2310972719968908432L; [sixnines:/export/home/amit/wsMustang/src/share/classes/java/sql] $ /java/re/jdk/6.0/promoted/all/b53/binaries/solaris-sparc/bin/serialver java.sql.SQLException java.sql.SQLException: static final long serialVersionUID = 2135244094396331484L; [sixnines:/export/home/amit/wsMustang/src/share/classes/java/sql] $ /java/re/jdk/6.0/promoted/all/b52/binaries/solaris-sparc/bin/serialver java.sql.SQLException java.sql.SQLException: static final long serialVersionUID = -7168310360230078160L; [sixnines:/export/home/amit/wsMustang/src/share/classes/java/sql] $ /java/re/jdk/6.0/promoted/all/b53/binaries/solaris-sparc/bin/serialver java.sql.SQLWarning java.sql.SQLWarning: static final long serialVersionUID = 3917336774604784856L; [sixnines:/export/home/amit/wsMustang/src/share/classes/java/sql] $ /java/re/jdk/6.0/promoted/all/b52/binaries/solaris-sparc/bin/serialver java.sql.SQLWarning java.sql.SQLWarning: static final long serialVersionUID = 379307918528545473L; [sixnines:/export/home/amit/wsMustang/src/share/classes/java/sql] $ /java/re/jdk/6.0/promoted/all/b53/binaries/solaris-sparc/bin/serialver java.sql.DataTruncation java.sql.DataTruncation: static final long serialVersionUID = 6464298989504059473L; [sixnines:/export/home/amit/wsMustang/src/share/classes/java/sql] $ /java/re/jdk/6.0/promoted/all/b52/binaries/solaris-sparc/bin/serialver java.sql.DataTruncation java.sql.DataTruncation: static final long serialVersionUID = 9197707232984813385L;
20-03-2006

EVALUATION These JCK1.5a tests fail under mustang b39 because serialVersionUID has been changed after integration of CCC 6283686 for the classes: java.sql.BatchUpdateException java.sql.SQLWarning java.sql.DataTruncation java.sql.SQLException java.sql.SQLWarning This is incompatible change. Java Objects Serialization Specification, Chapter 4.6 "Stream Unique Identifiers", states as follows: ... The stream-unique identifier is a 64-bit hash of the class name, interface class names, methods, and fields. The value must be declared in all versions of a class except the first. It may be declared in the original class but is not required. The value is fixed for all compatible classes. ... Please add the correct "private static final long serialVersionUID" constant to the classes above to make them compatible across J2SE versions. The correct serialVersionUID should be one that was in previous JDK releases (for example, 1.5): ----- <gyi@mars> /set/java/jdk1.5.0/solaris-sparc/bin/serialver java.sql.BatchUpdateException java.sql.BatchUpdateException: static final long serialVersionUID = 5977529877145521757L; <gyi@mars> /set/java/jdk1.6.0/solaris-sparc/bin/serialver java.sql.BatchUpdateException java.sql.BatchUpdateException: static final long serialVersionUID = -2310972719968908432L; <gyi@mars> /set/java/jdk1.5.0/solaris-sparc/bin/serialver java.sql.SQLException java.sql.SQLException: static final long serialVersionUID = 2135244094396331484L; <gyi@mars> /set/java/jdk1.6.0/solaris-sparc/bin/serialver java.sql.SQLException java.sql.SQLException: static final long serialVersionUID = -7168310360230078160L; <gyi@mars> /set/java/jdk1.5.0/solaris-sparc/bin/serialver java.sql.SQLWarning java.sql.SQLWarning: static final long serialVersionUID = 3917336774604784856L; <gyi@mars> /set/java/jdk1.6.0/solaris-sparc/bin/serialver java.sql.SQLWarning java.sql.SQLWarning: static final long serialVersionUID = 379307918528545473L; <gyi@mars> /set/java/jdk1.5.0/solaris-sparc/bin/serialver java.sql.DataTruncation java.sql.DataTruncation: static final long serialVersionUID = 6464298989504059473L; <gyi@mars> /set/java/jdk1.6.0/solaris-sparc/bin/serialver java.sql.DataTruncation java.sql.DataTruncation: static final long serialVersionUID = 9197707232984813385L; <gyi@mars> /set/java/jdk1.5.0/solaris-sparc/bin/serialver java.sql.SQLWarning java.sql.SQLWarning: static final long serialVersionUID = 3917336774604784856L; <gyi@mars> /set/java/jdk1.6.0/solaris-sparc/bin/serialver java.sql.SQLWarning java.sql.SQLWarning: static final long serialVersionUID = 379307918528545473L; ----- Reassigned to jdbc. ###@###.### 2005-06-11 17:09:12 GMT ###@###.### 2005-06-11 18:11:39 GMT I agree we should put serialversionUID in the classes. These will be checked in with changes for the new JDBC 4.0 spec changes. ###@###.### 2005-07-11 06:49:13 GMT The fix has been done in JDBC workspace and will be integrated with JDBC 4.0 changes into JDK workspace. ###@###.### 2005-07-11 11:05:18 GMT
11-06-2005