org.springframework.orm.hibernate4.HibernateSystemException: net.sf.ehcache.CacheException: java.io.StreamCorruptedException: invalid stream header: 00000000; nested exception is org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: java.io.StreamCorruptedException: invalid stream header: 00000000 at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:218) at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:730) at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:592) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
Abnormal, after investigation, it is found that the default configuration of ehache is persistent hard disk, and the cache storage paths of the two projects are the same, resulting in an error during deserialization.
Modify ehcache.xml and set diskPersistent="false" of the default cache.