JDK-4954608 : REGRESSION:java.awt.Container.AccessibleAWTContainer changed its serialVersionUI
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_2.6
  • CPU: generic,sparc
  • Submitted: 2003-11-14
  • Updated: 2004-03-19
  • Resolved: 2003-11-26
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.
Other
5.0 b30Fixed
Related Reports
Duplicate :  
Relates :  
Description

Name: ygR10224			Date: 11/14/2003


Filed By      : SPB JCK team (###@###.###)
JDK           : java full version "1.5.0-beta-b28"
JCK           : 1.5
Platform[s]   : Solaris
switch/Mode   : 
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] :
    api/java_awt/Window/AccessibleAWTWindow/serial/index.html#Input[serial2002]
    api/java_awt/Frame/AccessibleAWTFrame/serial/index.html#Input[serial2002]
    api/java_awt/Dialog/AccessibleAWTDialog/serial/index.html#Input[serial2002]
    api/java_awt/Container/AccessibleAWTContainer/serial/index.html#Input[serial2002]
    api/java_awt/Panel/AccessibleAWTPanel/serial/index.html#Input[serial2002]
    api/java_awt/ScrollPane/AccessibleAWTScrollPane/serial/index.html#Input[serial2002]


Specification excerpt:
======================
--------- J2SE API spec v.1.5 ---------
...
...
>From JOSS, ch. 4.6 "Stream Unique Identifiers":
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.
...
...
---------- end-of-excerpt ---------------

Problem description
===================
The serialVersionUID of java.awt.Container.AccessibleAWTContainer has been changed
in JDK1.5.0-beta-b28, so Serialized Form of this class has been changed incompatibly: 

<gyi@helmet> /set/java/jdk1.4.2/solaris/bin/serialver java.awt.Container.AccessibleAWTContainer
java.awt.Container.AccessibleAWTContainer:    static final long serialVersionUID = 5081320404842566097L;

<gyi@helmet> /set/java/jdk1.5.0/solaris/bin/serialver java.awt.Container.AccessibleAWTContainer
java.awt.Container.AccessibleAWTContainer:    static final long serialVersionUID = 8776987030964637380L;



JCK test source location:
==========================
/java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests

Test output:
=============
Checking for JDK Version : 1.3
Creating StreamObject from spec
Setting the value of serial fields
Converting the StreamObject to Object
I/O error. Got exception:
java.io.InvalidClassException: java.awt.Container$AccessibleAWTContainer; local class incompatible: stream classdesc serialVersionUID = 5081320404842566097, local class serialVersionUID = 8776987030964637380
	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:522)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1543)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1296)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
	at javasoft.sqe.serial.util.Convert.readObjectFromByteArray(Convert.java:120)
	at javasoft.sqe.serial.util.Convert.streamObjectToObject(Convert.java:53)
	at javasoft.sqe.tests.api.java.awt.Container.AccessibleAWTContainer.serial.InputTests.serial2002(InputTests.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:326)
	at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
	at javasoft.sqe.tests.api.java.awt.Container.AccessibleAWTContainer.serial.InputTests.main(InputTests.java:30)
......

Specific Machine Info:
=====================
SunOS helmet 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-2

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b30 tiger-beta VERIFIED IN: tiger-b40
14-06-2004

EVALUATION Name: rpR10076 Date: 11/18/2003 serialVersionUID needs to be specified for AccessibleAWTContainer. ###@###.### ======================================================================
11-06-2004

SUGGESTED FIX Name: rpR10076 Date: 11/18/2003 --- Container.java Tue Nov 18 13:54:59 2003 *************** *** 3448,3453 **** --- 3448,3458 ---- protected class AccessibleAWTContainer extends AccessibleAWTComponent { /** + * JDK1.3 serialVersionUID + */ + private static final long serialVersionUID = 5081320404842566097L; + + /** * Returns the number of accessible children in the object. If all * of the children of this object implement <code>Accessible</code>, * then this method should return the number of children of this object. ======================================================================
11-06-2004