dampce32 / memcached-session-manager

Automatically exported from code.google.com/p/memcached-session-manager
0 stars 0 forks source link

Serializing principals no longer work in Tomcat 8 #227

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Serialization does not work when deploying to Tomcat 8.0.21.

Tomcat has removed org.apache.catalina.ha.session.SerializablePrincipal, which 
MSM uses. Serialization fails with the following stack trace:

SEVERE [http-nio-8080-exec-5] 
org.apache.coyote.http11.AbstractHttp11Processor.process Error processing 
request
 java.lang.NoClassDefFoundError: org/apache/catalina/ha/session/SerializablePrincipal
    at de.javakaffee.web.msm.TranscoderService.serializePrincipal(TranscoderService.java:352)
    at de.javakaffee.web.msm.TranscoderService.serializeSessionFields(TranscoderService.java:207)
    at de.javakaffee.web.msm.TranscoderService.serializeSessionFields(TranscoderService.java:194)
    at de.javakaffee.web.msm.TranscoderService.serialize(TranscoderService.java:184)
    at de.javakaffee.web.msm.BackupSessionTask.call(BackupSessionTask.java:118)
    at de.javakaffee.web.msm.BackupSessionTask.call(BackupSessionTask.java:51)
    at de.javakaffee.web.msm.BackupSessionService$SynchronousExecutorService.submit(BackupSessionService.java:346)
    at de.javakaffee.web.msm.BackupSessionService.backupSession(BackupSessionService.java:205)
    at de.javakaffee.web.msm.MemcachedSessionService.backupSession(MemcachedSessionService.java:1040)
    at de.javakaffee.web.msm.RequestTrackingHostValve.backupSession(RequestTrackingHostValve.java:230)
    at de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:159)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1517)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1474)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: 
org.apache.catalina.ha.session.SerializablePrincipal
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 24 more

The class was deleted on the 16:th of December 2014 according to this mailing 
list message: http://svn.apache.org/viewvc?view=revision&revision=1645955. It 
is likely that earlier versions of Tomcat also are affected, but I haven't 
tested that. According to the patch, it is no longer needed since 
"GenericPrincipal now implements Serializable".

This has been tested with on:
Mac OS X 10.10.3
Oracle Java 1.8.0_11
Apache Tomcat 8.0.21
memcached-session-manager 1.8.3
memcached-session-manager-tc8 1.8.3

Original issue reported on code.google.com by schy...@ctrlprint.se on 27 Apr 2015 at 10:56

GoogleCodeExporter commented 9 years ago
Issues are moved to github, this one is now 
https://github.com/magro/memcached-session-manager/issues/266

Original comment by martin.grotzke on 24 Aug 2015 at 3:02