title: What is wrong with my config? SEVERE: IOException while loading persisted sessions: java.io.EOFException
body: <p>I have a web program using struts2, spring3 and hibernate 4 running in Tomcat. It can work, but Tomcat reports a <code>java.io.EOFException</code>.</p>
  
  <p>The following is the tomcat log:</p>
  
  <pre><code>INFO: Deploying web application directory D:\apache-tomcat-7.0.29\webapps\manager
  九月 10, 2012 4:27:02 下午 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:2298)
      at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2767)
      at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:798)
      at java.io.ObjectInputStream.&lt;init&gt;(ObjectInputStream.java:298)
      at org.apache.catalina.util.CustomObjectInputStream.&lt;init&gt;(CustomObjectInputStream.java:58)
      at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:246)
      at org.apache.catalina.session.StandardManager.load(StandardManager.java:204)
      at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:491)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
      at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
  
  九月 10, 2012 4:27:02 下午 org.apache.catalina.session.StandardManager startInternal
  SEVERE: Exception loading sessions from persistent storage
  java.io.EOFException
      at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2298)
      at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2767)
      at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:798)
      at java.io.ObjectInputStream.&lt;init&gt;(ObjectInputStream.java:298)
      at org.apache.catalina.util.CustomObjectInputStream.&lt;init&gt;(CustomObjectInputStream.java:58)
      at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:246)
      at org.apache.catalina.session.StandardManager.load(StandardManager.java:204)
      at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:491)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
      at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
  </code></pre>