dcsimg
Object serialization InvalidClassException under JBoss 2.4.4
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Christopher_Coles
Posted On:   Friday, May 24, 2002 10:05 PM

I am getting an InvalidClassException when deserializing. The serialization takes place in (what appears to be) one JVM and deserialization in another (assumed to be JBoss 2.4.4 EJB container and Web container JVMs). All is fine if I use simple java primitives, simple custom classes etc. However, when a nested class of type say ArrayList, or say [] I get the exception. I have drilled into the problem sufficent to see that the SUID of say ArrayList (as local class) is different to stream (ie. serialized) SUID; hence the exception. How can this be the case when the SUID of say ArrayList (a java Class over which I have no control) has a different SUID in the same application environment (I am using Java V1.3.0_02). Furthermore dumping out the SUID via ObjectStreamClass.g   More>>

I am getting an InvalidClassException when deserializing. The serialization takes place in (what appears to be) one JVM and deserialization in another (assumed to be JBoss 2.4.4 EJB container and Web container JVMs). All is fine if I use simple java primitives, simple custom classes etc. However, when a nested class of type say ArrayList, or say [] I get the exception. I have drilled into the problem sufficent to see that the SUID of say ArrayList (as local class) is different to stream (ie. serialized) SUID; hence the exception. How can this be the case when the SUID of say ArrayList (a java Class over which I have no control) has a different SUID in the same application environment (I am using Java V1.3.0_02). Furthermore dumping out the SUID via ObjectStreamClass.getSerialVersionUID() for ArayList in both JVMs yields the same SUID. How can the generated SUID on the serialized stream be different.

   <<Less
About | Sitemap | Contact