java - where can I set the stream classdesc serialVersionUID? -


i using class implements serializable jar, , make sure there won't compiler related issues gave serialversionuid private static final long serialversionuid = 123l;

i recreated jar when using class inside new jar giving me exception:

java.io.invalidclassexception: com.placeiq.piqhash.piqdeviceid; local class incompatible: stream classdesc serialversionuid = 1568630193381428614, local class serialversionuid = 123

so question is: 1, stream classdesc serialversionuid? 2, can set 2 serialversionuid same?

thanks!

a serialized version of class coming somewhere (in stream) , has serial version id of 1568... can't deserialized class version (the local class) 123.

you need figure out other version coming from. need use new jar, new version of class ever (if can).

some possible sources:

  • a network message other computer coming program serialized instance of class. (this raw socket messages or rmi or uses java serialization. not going json message or xml message gets mapped object.)

  • another program or older version of program wrote instance of class file on disk (or otherwise withing file system) , program not retrieving it.

  • your program has 2 versions of jar--an old 1 , new one--that present, because of different classloaders. (this can happen if aren't careful manage classpaths available on java ee container of sort, including tomcat or jetty.)

this not exhaustive list.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -