• New Feature
  • Status: Open
  • 2 Major
  • Resolution:
  • ehcache-core
  • Reporter: olamy
  • March 04, 2011
  • 0
  • Watchers: 3
  • October 11, 2011

Description

Just encountered the following issue :


2011-03-04 15:18:19,916 ERROR c.a.t.t.w.s.i.ExceptionLogger : java.io.InvalidClassException: com.accor.tars.tools.api.enterprise.chain.Chain; local class incompatible: stream classdesc serialVersionUID = 9011182591418795268, local class serialVersionUID = -7286565524645379272 from ActionInvocation class com.opensymphony.xwork2.DefaultActionInvocation
net.sf.ehcache.CacheException: java.io.InvalidClassException: xxxxx.chain.Chain; local class incompatible: stream classdesc serialVersionUID = 9011182591418795268, local class serialVersionUID = -7286565524645379272
        at net.sf.ehcache.store.compound.factories.DiskPersistentStorageFactory.retrieve(DiskPersistentStorageFactory.java:210) ~[ehcache-core-2.3.2.jar:na]
        at net.sf.ehcache.store.compound.factories.DiskPersistentStorageFactory.retrieve(DiskPersistentStorageFactory.java:59) ~[ehcache-core-2.3.2.jar:na]

It could be nice if this could be quietly (only a warn ?) ignored (at least with a new configuration parameter) and the element remove from the disk.

Comments

Fiona OShea 2011-03-04

Greg what do you think about this?

Tim Eck 2011-03-04

Seems of questionable value to do internally in the cache, seems more like a app level decision

If we were to do it though I’m not sure I’d limit the behavior to the disk store – seems like any deserialization error on read should cause this auto-remove.