[jdom-interest] serialVersionUID for JDOM classes

Andres March Andres at ehealthcontracts.com
Fri May 24 14:32:36 PDT 2002


I am not having fun anymore.  I am going to have to roll back to using b6 unless I figure this out by the end of the day.

In order to eliminate compiler differences, I decided to use the binary of jdom.jar instead of compiling the classes into my own jars.  No luck.  The below error occurs.  I have seen many posts regarding this problem from last year.  I don't know why it only started affecting me when I upgraded to b8.  Oh well.

If anyone is interested:

java.io.InvalidClassException: org.jdom.Document; Local class not compatible: stream classdesc serialVersionUID=-7490734664163224606 local class serialVersionUID=607431889463202798 	at java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:518) 	at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:562) 	at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:931) 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361) 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231) 	at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1181) 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381) 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231) 	at java.util.HashMap.readObject(HashMap.java:835) 	at java.lang.reflect.Method.invoke(Native Method) 	at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2209) 	at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1406) 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381) 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231) 	at com.ehc.util.Conduit.receiveObject(Conduit.java:326) 	at com.ehc.util.ServletTunnel.getResponse(ServletTunnel.java:94) 	at com.ehc.util.ServletTunnel.invoke(ServletTunnel.java:130) 	at com.ehc.ui.session.AppEnvironment.communicateToServlet(AppEnvironment.java:494)


-----Original Message-----
From: Michael Salmon [mailto:ms at speakeasy.net]
Sent: Friday, May 24, 2002 2:07 PM
To: Andres March
Cc: JDOM list (E-mail)
Subject: Re: [jdom-interest] serialVersionUID for JDOM classes


Even adding them by hand didnt save me from getting ClassCastEXceptions
when deserializing Documents in an applet. So I'm not sure it really would
help across the board. Especially that its not even a release yet. It's
definitly not a standard thing projects do either.

ms-

On Fri, May 24, 2002 at 04:53:56PM -0400, Andres March wrote:
> Is there a reason serialVersionUIDs are not implemented in JDOMs source
> files?
> 
> -Andres
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list