<strong>PROBLEMS IN EMBEDDING serialVersionUID INTO VECTORS WHILE SERIALIZING THEM..</strong>
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   thillai_selvan
Posted On:   Friday, September 7, 2001 11:03 PM

HI, I Want to pass vectors between jsp pages, I tried to serialize the vector to a string and pass it as a parameter to another jsp. Iam able to serialize it to a string but unable to deserialize it back in the other jsp. Iam getting an InvalidClassException . From further reading regarding this issue i came to know that InvalidClassException can be avoided by embedding the serialVersionUID along the object to be serialized, so i added the serialVersionUID for vector(2767605614048989439L) as an element of the vector and passed it across but still iam not able to deserialize the vector back.How should i embedd this serialVersionUID into a vector? can you help be in this regard, t   More>>

HI,


I Want to pass vectors between jsp pages, I tried to serialize the vector to a string and pass it as a parameter to another jsp. Iam able to serialize it to a string but unable to deserialize it back in the other jsp. Iam getting an InvalidClassException .




From further reading regarding this issue i came to know that InvalidClassException can be avoided by embedding the serialVersionUID along the object to be serialized, so i added the serialVersionUID for vector(2767605614048989439L) as an element of the vector and passed it across but still iam not able to deserialize the vector back.How should i embedd this serialVersionUID into a vector?






can you help be in this regard, thanks in advance    <<Less

Re: <strong>PROBLEMS IN EMBEDDING serialVersionUID INTO VECTORS WHILE SERIALIZING THEM..</strong>

Posted By:   Kevin_Riff  
Posted On:   Sunday, September 16, 2001 10:18 PM

I think you've misunderstood the purpose of the serialVersionUID. It must be set as a static final field of your class, not as an element of the vector. Besides, it could only be a problem if you tried to read data that had been serialized by an older version of the same class.
About | Sitemap | Contact