Tomcat startup post: IOException while loading persisted sessions:Java.io.EOFException error
-IOException while loading persisted sessions:java.io.EOFException
Java.io.EOFException
At Java.io.objectinputstream$peekinputstream.readfully (objectinputstream.java:2279)
At Java.io.objectinputstream$blockdatainputstream.readshort (objectinputstream.java:2748)
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:57)
At Org.apache.catalina.session.StandardManager.doLoad (standardmanager.java:361)
At Org.apache.catalina.session.StandardManager.load (standardmanager.java:320)
At Org.apache.catalina.session.StandardManager.start (standardmanager.java:634)
At Org.apache.catalina.core.ContainerBase.setManager (containerbase.java:431)
At Org.apache.catalina.startup.ContextConfig.managerConfig (contextconfig.java:391)
At Org.apache.catalina.startup.ContextConfig.start (contextconfig.java:1042)
At Org.apache.catalina.startup.ContextConfig.lifecycleEvent (contextconfig.java:255)
At Org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (lifecyclesupport.java:119)
At Org.apache.catalina.core.StandardContext.start (standardcontext.java:4053)
At Org.apache.catalina.core.ContainerBase.start (containerbase.java:1012)
At Org.apache.catalina.core.StandardHost.start (standardhost.java:718)
At Org.apache.catalina.core.ContainerBase.start (containerbase.java:1012)
At Org.apache.catalina.core.StandardEngine.start (standardengine.java:442)
At Org.apache.catalina.core.StandardService.start (standardservice.java:450)
At Org.apache.catalina.core.StandardServer.start (standardserver.java:683)
At Org.apache.catalina.startup.Catalina.start (catalina.java:537)
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:271)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:409)
-Exception loading sessions from persistent storage
Java.io.EOFException
At Java.io.objectinputstream$peekinputstream.readfully (objectinputstream.java:2279)
At Java.io.objectinputstream$blockdatainputstream.readshort (objectinputstream.java:2748)
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:57)
At Org.apache.catalina.session.StandardManager.doLoad (standardmanager.java:361)
At Org.apache.catalina.session.StandardManager.load (standardmanager.java:320)
At Org.apache.catalina.session.StandardManager.start (standardmanager.java:634)
At Org.apache.catalina.core.ContainerBase.setManager (containerbase.java:431)
At Org.apache.catalina.startup.ContextConfig.managerConfig (contextconfig.java:391)
At Org.apache.catalina.startup.ContextConfig.start (contextconfig.java:1042)
At Org.apache.catalina.startup.ContextConfig.lifecycleEvent (contextconfig.java:255)
At Org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (lifecyclesupport.java:119)
At Org.apache.catalina.core.StandardContext.start (standardcontext.java:4053)
At Org.apache.catalina.core.ContainerBase.start (containerbase.java:1012)
At Org.apache.catalina.core.StandardHost.start (standardhost.java:718)
At Org.apache.catalina.core.ContainerBase.start (containerbase.java:1012)
At Org.apache.catalina.core.StandardEngine.start (standardengine.java:442)
At Org.apache.catalina.core.StandardService.start (standardservice.java:450)
At Org.apache.catalina.core.StandardServer.start (standardserver.java:683)
At Org.apache.catalina.startup.Catalina.start (catalina.java:537)
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:271)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:409)
This exception is caused by the fact that Tomcat reads the session on the hard disk when it is started, and this exception occurs when the read fails.
Solution: (1) Delete the Session.ser file under the Apache-tomcat-7.0.25\work\catalina\localhost\ project name (recommended)
(2) Delete all the Session.ser files under Apache-tomcat-7.0.25\work\catalina\localhost
Handling of eofexception anomalies