CachedRowSetImpl in 1.5 incompatible to Tiger 1.01 ref impl

J

Jochen Riekhof

Hi...

we use the SUN CachedRowSetImpl (currently Tiger 1.01) reference
implementation for a while in server-client data exchange just fine. Now
we are trying to experiment with clients wunning on jdk1.5_03 and get
the following error (excerpt):
java.rmi.UnmarshalException: error unmarshalling return; nested
exception is:
java.io.InvalidClassException:
javax.sql.rowset.RowSetMetaDataImpl$ColInfo; local class incompatible:
stream classdesc serialVersionUID = 4431284943651249319, local class
serialVersionUID = 5490834817919311283

Is there any version of the CachedRowSetImpl for 1.4.2 that is
compatible with 1.5? I was not able to google up any.

Ciao

....Jochen
 
R

Roedy Green

java.rmi.UnmarshalException: error unmarshalling return; nested
exception is:
java.io.InvalidClassException:

Almost every Sun Java class warns you that code between versions is
incompatible. Serialization is for temporary storage only. For long
term storage you need your own object that persists the crucial
parameters about the Component. This will be considerably smaller than
Sun's object which is mostly full of defaults.
 
R

Roedy Green

Almost every Sun Java class warns you that code between versions is
incompatible. Serialization is for temporary storage only. For long
term storage you need your own object that persists the crucial
parameters about the Component. This will be considerably smaller than
Sun's object which is mostly full of defaults.

I just changed some code that persisted BigInteger to avoid such
problems by using a DataOutputStream instead.

On the other paw, one thing ObjectStreams do is automatically check
the format for you. With DataInputStream, you can eat any stream of
bytes reading totally the wrong file and never know it.

You had better put some signature/version information at the head.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top