From: Chris C. <ck...@id...> - 2002-05-31 19:19:43
|
This sounds to me to be more like a Java Class SerializationID issue than JBoss issue. Every time you recompile a java class code, the SerializationID is generated. Supposedly they need to match in order for the Java Runtime to know that they are the same classes. For instance, what if you changed some code inside the Java class (same name, but added new code)? When you deserialize, it will cause a ClassCastException as the JDK thinks that the classes are not the same. What you can technically do is set the SerializationID manually and change it yourself. It is a public static final long (I think). However, I may be wrong as it's been a while since I touched object serializations. I normally use XML in place of serialization for storage these days for comptability reasons. Thanks, Chris At 12:06 PM 05/31/2002, you wrote: >I've narrowed down my ClassCastException to >deserializing an Object after redeploying. > >I serialize an Object to BLOB in MySQL using >CMP. Then redeploy and when I deserialize the >object I can't cast the Object to one of it's >interfaces. > >Could this be some ClassLoader issue? The >interface is loaded by a JBoss class loader >and the deserialized object is loaded by >another ClassLoader. > >I think I've got a good handle on the problem, >but can't think of a good solution - aside from >not using hot deploy... > >Tx for any thoughts! >JD PGP at ldap://certserver.pgp.com/ |