Summary: | Cannot deserialize session when it contains Externalizable objects (using PersistentManager) | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | Maxime Falaize <maxime.falaize> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | P2 | ||
Version: | 7.0.42 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All |
Description
Maxime Falaize
2013-08-05 15:15:18 UTC
My workaround to make it working is to add Thread.currentThread().setContextClassLoader(classLoader) in the JDBCStore (between line 644 and 645 in method load(String):Session) : if (classLoader != null) Thread.currentThread().setContextClassLoader(classLoader); ois = new CustomObjectInputStream(bis, classLoader); } else { ois = new ObjectInputStream(bis); } Maybe add a try catch to catch the SecurityException thrown by the setContextClassLoader method. Thanks for the report. Fixed in trunk and 7.0.x and will be included in 7.0.43 onwards. |