Tomcat Launch Report Eofexception exception

Source: Internet
Author: User
Tags sessions tomcat

The recent use of Eclipse to launch Tomcat eofexception abnormal, although not affect the use, but always feel uncomfortable, to find a way to solve a bit.

After analysis, the original is Tomcat did not shut down, I basically every time through the task Manager to kill the thread, mainly in the project some resources are not released, under normal circumstances Tomcat will not shut down, so only kill the process.

Because Tomcat does not shut down properly, the processing tools that it does when it is closed, such as session persistence, may not be finished. The exception here is the problem.


"Cause analysis"
Eofexception indicates that the input process unexpectedly reaches the end of the file or the signal at the end of the stream, resulting in data failure from the session. The exception is the problem with Tomcat itself, because there are some active sessions being persisted (shown as temporary files) during Tomcat's last abnormal shutdown, and at reboot, Tomcat tries to recover the persisted data of the session but fails to read the result. This exception does not affect the use of the system. Because the session data that is saved on the hard disk fails to read, the problem appears to be small, but if you do not handle it, this problem will occur every time you start.


"Workaround"  
      Empty the files under work, mostly *.ser files, or just delete Session.ser.  
      If the server is closed gracefully, the file is automatically deleted.  
      Work\catalina\localhost\yourprojectname\sessions.ser Delete. If the server is shut down gracefully, the file is automatically deleted.  
      NOTE: Yourprojectname is the name of the Web project you are currently working on.  
      for each person's Tomat working directory, it is recommended that you find your Sessions.ser file in the search function, and only delete it. \yourprojectname\ under the Sessions.ser can be.  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.