SEVERE: IOException while loading persisted sessions: java.io.EOFException

1、错误重现

SEVERE: IOException while loading persisted sessions: java.io.EOFException
java.io.EOFException
	at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2304)
	at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2773)
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:798)
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:298)
	at org.apache.catalina.util.CustomObjectInputStream.<init>(CustomObjectInputStream.java:58)
	at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:246)
	at org.apache.catalina.session.StandardManager.load(StandardManager.java:204)
	at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:491)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5300)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)

 2、解决办法

原因是tomcat对硬盘的session读取失败,彻底解决办法一下:将work下面的文件清空,主要是*.ser文件,或者只是删除掉session.ser即可以解决。如果是Maven管理tomcat的话,先clean 再tomcat7:run即可。

 

你可能感兴趣的:(EOFException)