exception loading sessions from persistent storage
Just Clean the Tomcat Work Directory..which is worked well to me.
This is to do with Tomcat not being able to load previously serialized web sessions that had been saved on an earlier shutdown. This may be because Tomcat didn't shutdown cleanly and so session objects got corrupted during serialization.
One way to make this error go away would be to disable session persistence across restarts. You can do this by editing the file CATALINA_HOME/conf/context.xml
and setting the pathname
attribute of the <Manager>
to an empty string. This is well documented in the file for Tomcat 7:
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<Manager pathname="" />
You should also delete any old session.ser
files from the CATALINA_HOME/work/Catalina/localhost/<appName>
folder whilst Tomcat is shutdown.
This may not be acceptable in your case if session persistence across restarts is needed. In which case further debugging of the issue would be necessary.
Delete tomcat "work" folder. Restart tomcat server, hopefully now it'll run without any exception or error!
This can be done by selecting the server within Tomcat and selecting "Clean Tomcat Work Directory"
If you are working with Spring Boot, just add it to the application.properties:
server.servlet.session.persistent=false