`
pcial
  • 浏览: 71155 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

关于org.apache.catalina.session.StandardManager doLoad错误的解决

    博客分类:
  • JAVA
阅读更多

2009-7-28 14:46:11 org.apache.catalina.session.StandardManager doLoad
在开发项目的时候,偶尔遇到了如下问题,在启动tomcat时抛出下列异常

严重: IOException while loading persisted sessions: java.io.EOFException
java.io.EOFException
 at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2232)
 at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
 at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
 at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
 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:432)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4160)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:448)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
 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:585)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
2009-7-28 14:46:11 org.apache.catalina.session.StandardManager start
严重: Exception loading sessions from persistent storage
java.io.EOFException
 at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2232)
 at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
 at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
 at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
 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:432)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4160)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:448)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
 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:585)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
2009-7-28 14:46:32 org.apache.coyote.http11.Http11BaseProtocol start

该异常是由于关闭服务器时tomcat上次关闭时还有一些活动连接,Session未超时,将Session保存在磁盘上,在启动时又重新加载,所以在重启时tomcat尝试去恢复这些session造成的

解决方法:tomcat的work目录下面的东西删一遍。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics