Tomcat 严重: IOException while loading persisted sessions: java.io.EOFException解决 note

错误代码如下:

严重: IOException while loading persisted sessions: java.io.EOFException
java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2318)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2614)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:801)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
at org.apache.catalina.util.CustomObjectInputStream.<init>(CustomObjectInputStream.java:58)
at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:226)
at org.apache.catalina.session.StandardManager.load(StandardManager.java:183)
at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:473)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5293)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:698)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1119)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1760)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:744)

  这是由于tomcat上次非正常关闭时有一些活动session被表现为一些临时文件,在重启时,tomcat尝试去恢复这些session的持久化数据但又读取失败造成的。此异常不影响系统的使用。

解决途径:在当前目录下找到你要运行的项目,根据自己的Tomcat所在位置。括号内是我的存放地址(D:\program files\apache-tomcat-7.0.96\work\Catalina\localhost)

 然后双击进去,看到(org文件夹和sessions.ser)

 删除sessions.ser文件即可。

参考https://blog.csdn.net/redarmy_chen/article/details/17756725

posted on 2019-10-10 11:06  MyNote^^  阅读(107)  评论(0编辑  收藏  举报