tomcat 启动时报 SEVERE: IOException while loading persisted sessions: java.io.EOFExc

tomcat 启动时,报

tomcat  startup error,due

Aug 29, 2012 10:37:36 AM org.apache.catalina.session.StandardManager doLoad
SEVERE: IOException while loading persisted sessions: java.io.EOFException
java.io.EOFException
 at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
 at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
 at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
 at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
 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:643)
 at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:438)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4559)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
 at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
 at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
 at org.apache.catalina.core.StandardService.start(StandardService.java:519)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
 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:289)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Aug 29, 2012 10:37:36 AM org.apache.catalina.session.StandardManager start
SEVERE: Exception loading sessions from persistent storage
java.io.EOFException
 at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
 at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
 at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
 at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
 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:643)
 at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:438)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4559)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
 at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
 at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
 at org.apache.catalina.core.StandardService.start(StandardService.java:519)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
 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:289)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

 

 

由于上次tomcat ,非正常关闭,导致持久化到硬盘的session文件不正常,所以在读取时候会报错。

解决方法是 删除 work目录下的session.ser文件

你可能感兴趣的:(exception)