java.io.InvalidClassException异常处理
java.io.InvalidClassException: xxx.Xxxx; local class incompatible: stream classdesc serialVersionUID = 3131289854159272837, local class serialVersionUID = 718464469340458400at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:604)at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1601)at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1601)at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1601)at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) ..............?
?
最近出现了这么一个问题,出现这个问题只有一个原因:客户端的类与服务端的类版本不同步,也就是说客户端下载的jar包和服务端的jar包不一致。
解决的方法是:根据异常信息提示的类名找到该jar包,将服务器上用来下载的jar包与服务器真正应用的jar包同步。