Session Deserialization Errors in Tomcat
Last modified by superadmin on 2026/11/25 21:30
Tomcat fails to restore persisted sessions holding non-serializable objects, which an empty session store avoids.
Explanation
When starting XWiki on Tomcat, you may encounter errors similar to the following in catalina.log:
SEVERE: IOException while loading persisted sessions:
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
org.xwiki.model.internal.reference.LocalStringEntityReferenceSerializerCause
Tomcat persists HTTP sessions between restarts by default. During startup, it attempts to restore previously saved sessions. This error occurs when a non-serializable object was stored in a session and Tomcat fails to deserialize it during restoration.
Solution
To work around the issue, tell Tomcat not to persist sessions by giving the web application an empty session store.
- Disable Tomcat session persistence by adding the following configuration to the Tomcat context configuration:
<Manager pathname="" /> - Restart Tomcat.
After disabling session persistence, Tomcat will no longer attempt to restore saved sessions during startup, preventing this error.