Premier Indore

Greenhorn
+ Follow
since Sep 12, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Premier Indore

Hi,
You can use XMLEncoder,Decoder classes in the package java.beans with JDK1.4.1. This provides very easy way to persist the data using the XML, but one constraints is that your class structure must follow the Java Beans architectute i.e. all the class members must have there getter/setters.

Hope this suggestion help you.
Regards
premier
20 years ago
I have problem related to serialization, pls suggest the most appropriate solution, the problem is that I have a class AAAA.java which extends AbstractListModel.java class of JDK, and it is serializable. When i saw the serialVersionUID of AbstractListModel.java using the java tool serialver in jdk 1.3.1 from the command line it gives 2622425607724314306 (Unique ID of class) but when i saw it in JDK 1.4.1 then it given -3285184064379168730. As the UID is changed from JDK1.3.1 to 1.4.1, Now the problem is that i serialized a file which uses AAAA.java using the 1.3.1 and now i want to open that file in my project using 1.4.1 it gives exception.
java.io.InvalidClassException: javax.swing.AbstractListModel; local class incompatible: stream classdesc serialVersionUID = 2622425607724314306, local class serialVersionUID = -3285184064379168730
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:459)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
Can u suggest me appropriate solution as this file must be desirialized (Compatibility issue) as it is generated from project.
U may also try using this command in jdk 1.3.1 & 1.4.1
on command prompt
serialver javax.swing.AbstractListModel.
20 years ago