Sunday, February 20, 2011

Tomcat - IOException while loading persisted sessions

Tomcat save server state when shutdown. Thus, improper shutdown and save state may cause the following error when you start your tomcat server

Feb 21, 2011 6:01:18 PM 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:2281)

To solve this issue, all you need is to delete the content in the your_tomcat/work directory and restart your server.

Basically, tomcat is trying to look for and read in SESSION.ser. In general, the work directory is working directory for tomcat which reside the JSP and their resulting compiled class files.

24 comments:

  1. Hi

    I also have this problem
    SEVERE: IOException while loading persisted sessions: java.io.EOFException
    java.io.EOFException
    SEVERE: Exception loading sessions from persistent storage
    java.io.EOFException

    But I don't have any *.ser files in tomcat_work

    ReplyDelete
  2. Did you try deleting all contents within the work folder?

    ReplyDelete
  3. very nice and good solution.... it works

    ReplyDelete
  4. Where do I find the "work folder" in MyEclipse running MyEclipseTomcat?

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Try finding it at

    "your workspace"/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work

    ReplyDelete
  7. thanks

    "your workspace"/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work

    worked

    ReplyDelete
  8. not an impediment issue in my part, but it definitely removed those irritating errors everytime i deploy my project locally.... thanks for this wonder tip!

    ReplyDelete
  9. Other way is to "clean" the server tomcat.

    ReplyDelete