Java. Io. invalidclassexception: cartonprintvo; local class incompatible: stream classdesc serialversio

Source: Internet
Author: User

Symptom:

Java. Io. invalidclassexception: cartonprintvo; local class incompatible: stream classdesc serialversionuid = XXXXX, local class serialversionuid = XXXXX

Solution:

Today, after modifying a Vo class, the system reports

Java. Io. invalidclassexception: www.gbsou.com. cartonprintvo; local class incompatible: stream classdesc serialversionuid = 1412277949381450533, local class serialversionuid =-3559189311748262112

Exception. the following causes are analyzed:

The value of serialversionuid in the local and remote classes is different.

 

Solution:

Change the version number (serialversionuid) in the locally serialized class to the same as that in the same process.

From the above column exception, we can see that

Stream classdesc serialversionuid = 1412277949381450533, (remote)

Local class serialversionuid =-3559189311748262112 (local)

So you just need to change Private Static final long serialversionuid = in the local serialization class to a remote one.

No Private Static final long serialversionuid = this line of code is added.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.