`

严重: IOException while loading persisted sessions: java.io.EOFException

阅读更多

2011-3-7 14:32:59 org.apache.catalina.session.StandardManager doLoad
严重: IOException while loading persisted sessions: java.io.EOFException
java.io.EOFException
	at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281)
	at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
	at org.apache.catalina.util.CustomObjectInputStream.<init>(CustomObjectInputStream.java:58)
	at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:362)
	at org.apache.catalina.session.StandardManager.load(StandardManager.java:321)
	at org.apache.catalina.session.StandardManager.start(StandardManager.java:637)
	at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:438)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4271)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2011-3-7 14:32:59 org.apache.catalina.session.StandardManager start
严重: Exception loading sessions from persistent storage
java.io.EOFException
	at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281)
	at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
	at org.apache.catalina.util.CustomObjectInputStream.<init>(CustomObjectInputStream.java:58)
	at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:362)
	at org.apache.catalina.session.StandardManager.load(StandardManager.java:321)
	at org.apache.catalina.session.StandardManager.start(StandardManager.java:637)
	at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:438)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4271)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
log4j:ERROR Could not find value for key log4j.appender.CONSOLE
log4j:ERROR Could not instantiate appender named "CONSOLE".
 分析: session未超时的情况下,服务器关闭的时候会被序列化为工程名\SESSIONS.ser,tomcat 启动的时候再加载进来,EOFException表示tomcat上次关闭时还有一些活动连接,所以在重启时tomcat尝试去恢复这些session,但是在输入过程中意外地到达文件尾或流尾的信号,导致从session中获取数据失败。异常是tomcat本身的问题,由于tomcat上次非正常关闭时有一些活动session被持 久化(表现为一些临时文件),在重启时,tomcat尝试去恢复这些session的持久化数据但又读取失败造成的。此异常不影响系统的使用。

解决办法:将 tomcat_home\work\Catalina\localhost\『工程名』\SESSIONS.ser删除。如果正常关闭服务端,该文件是自 动删除的。考虑到每个人的tomat的工作目录不同,建议在“搜索”功能中找到你的SESSIONS.ser文件,而且只需要删 除..\yourProjectName\下的SESSIONS.ser即可。 

最简单的办法是work下的全部删除,然后重启tomcat。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics