java.io.StreamCorruptedException: invalid stream header: 00000000

Open source software supply chain lighting plan, waiting for you>>>

Caused by: java.io.StreamCorruptedException: invalid stream header: 00000000
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:857) ~[?:1.8.0_144]
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:349) ~[?:1.8.0_144]
	at net.sf.ehcache.util.PreferTCCLObjectInputStream.<init>(PreferTCCLObjectInputStream.java:39) ~[ehcache-core-2.5.0.jar!/:?]
	at net.sf.ehcache.store.disk.DiskStorageFactory.read(DiskStorageFactory.java:375) ~[ehcache-core-2.5.0.jar!/:?]
	at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:936) ~[ehcache-core-2.5.0.jar!/:?]
	at net.sf.ehcache.store.disk.Segment.decode(Segment.java:167) ~[ehcache-core-2.5.0.jar!/:?]
	at net.sf.ehcache.store.disk.Segment.put(Segment.java:444) ~[ehcache-core-2.5.0.jar!/:?]
	at net.sf.ehcache.store.disk.DiskStore.put(DiskStore.java:475) ~[ehcache-core-2.5.0.jar!/:?]
	at net.sf.ehcache.store.FrontEndCacheTier.put(FrontEndCacheTier.java:221) ~[ehcache-core-2.5.0.jar!/:?]
	at net.sf.ehcache.Cache.putInternal(Cache.java:1492) ~[ehcache-core-2.5.0.jar!/:?]
	at net.sf.ehcache.Cache.put(Cache.java:1417) ~[ehcache-core-2.5.0.jar!/:?]
	at net.sf.ehcache.Cache.put(Cache.java:1382) ~[ehcache-core-2.5.0.jar!/:?]
	at org.apache.shiro.cache.ehcache.EhCache.put(EhCache.java:102) ~[shiro-ehcache-1.2.6.jar!/:1.2.6]
	... 62 more

Note: because the default configuration of ehache is persistent hard disk, and the cache repositories of the two projects are the same, an error occurs during deserialization
solution: if the cache repository is set differently or ehcache.xml is modified, set the diskpersistent of the default cache to false

Similar Posts: