java.io.invalidClassException during serializing/deserializing

后端 未结 3 1798
再見小時候
再見小時候 2020-12-07 02:45

I\'ve got an object that im reading and writing to and from fileinputstreams/objectinputstreams and objectinputstreams/objectoutputstreams. I keep

3条回答
  •  眼角桃花
    2020-12-07 03:15

    You see the first line?
    You have differenct serialVersionUIDs, theay don't are compatible with each other, you have to use the same serialVersionUID!

    java.io.InvalidClassException:

    com.luxurymode.pojos.Reminder; Incompatible class (SUID): com.luxurymode.pojos.Reminder: static final long serialVersionUID =4209360273818925922L; but expected com.luxurymode.pojos.Reminder: static final long serialVersionUID =1L;

提交回复
热议问题