Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4088176
Votes 0
Synopsis backward compat. fails reading an evolved class with new field,nonexistant class
Category java:serialization
Reported Against 1.1.5 , 1.2beta
Release Fixed 1.2(1.2beta3)
State 11-Closed, Unverified, bug
Priority: 2-High
Related Bugs 4089540 , 4156672 , 4634165
Submit Date 23-OCT-1997
Description
ClassNotFoundException is thrown when reading an evolved class with
a new field from a serialized stream when the type of the
new field did not exist in the original classes hierarchy.
Work Around
When ClassNotFoundException is thrown for the scenario described
in description, just make the missing class available in
the original class hierarchy. 

Be sure that the dummy class definition
implements Serializable and the serialVersionUID is explicitly set
to the serialver of the missing class.
Evaluation
In short, the following java.awt classes are not currently backwards compatible
from JDK1.2 to any JDK 1.1.x release.  Color, Font and Component.
All three of these classes had fields added to them in JDK 1.2
with new classes.  The ClassNotFoundException is thrown when a JDK 1.2
serialized stream containining an instance of one of these objects
is read back into JDK 1.1.x.
Comments
  
  Include a link with my name & email   

Submitted On 27-NOV-2000
gberche
I believe java.net.URL class is also not currently backwards compatible, but maybe for other reasons (in JDK 
1.2.2)



PLEASE NOTE: JDK6 is formerly known as Project Mustang