Reputation: 35
We are setting up Tomcat 7 clusters and we need to use Memcached Session Manager to manage the session among multiple Tomcat 7 instances.
I have included the following 2 jar files into "/usr/share/tomcat7/lib/": memcached-2.5.jar memcached-session-manager-tc7-1.6.5.jar
And updated server.xml by including this:
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context path="" reloadable="true" docBase="/var/lib/tomcat7/webapps/ROOT/">
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n1:localhost:11211" sticky="false" lockingMode="all"
requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"
transcoderFactoryClass="de.javakaffee.web.msm.JavaSerializationTranscoderFactory" />
</Context>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
However, every time I tried to start the tomcat instance, I get this error:
java.lang.NoClassDefFoundError: de/javakaffee/web/msm/MemcachedSessionService$SessionManager at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
Anyone can shed some light on which part has gone wrong will be very much appreciated.
Many thanks
Upvotes: 1
Views: 7270
Reputation: 996
It seems like you are missing following jar:
Please read the following link for more details: https://code.google.com/archive/p/memcached-session-manager/wikis/SetupAndConfiguration.wiki
Upvotes: 2