I am getting the following deserialization error:
error="Cannot deserialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is java.io.InvalidClassException: pad.model.BinDataItem; local class incompatible: stream classdesc serialVersionUID = -202572514421736723, local class serialVersionUID = -1432167403664224814 ->
Here is the overall flow of the application. The app loads a mongo db collection into redis as objects. For this purpose, I implemented the serializable interface in the classes used to map the documents and persist into redis. Whenever a change happens in db, the entire list in redis is loaded from scratch.
The other thing I noticed is that I am altering the cache from two sources. I use the same redis url that I use in higher environments. I am getting this issue in the higher environment. So whenever I test locally I reload the entire cache from scratch also impacting the app deployed in the higher environment. I don't know if there can a be serializationID mismatch issue here when altering the cache from two different sources that have the same or different pojo structure. Can there be a serialization issue here?
The issue went away when I restarted the application locally and reloaded the cache from scratch. When can this issue happen?