yufish / memcached-session-manager

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

Receiving 'NoClassDefFoundError: org/apache/commons/lang/StringUtils' #170

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Drop jars in CATALINA_HOME/lib
2. Add <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
    memcachedNodes="memcachedserver:11211" 
    requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$" /> to Context.xml
3. Start Tomcat

What is the expected output? What do you see instead?

I expect Tomcat to start, memcached sessions to work.  Instead, I receive the 
following exception:

java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
        at net.logstash.log4j.JSONEventLayout.format(JSONEventLayout.java:72)
        at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:310)
        at org.apache.log4j.DailyRollingFileAppender.subAppend(DailyRollingFileAppender.java:36
        at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
        at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
        at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttach
        at org.apache.log4j.Category.callAppenders(Category.java:206)
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.log(Category.java:856)
        at org.apache.juli.logging.impl.Log4JLogger.error(Log4JLogger.java:257)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:507)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:371)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:458)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.StringUtils
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        ... 17 more

What version of the product are you using? On what operating system?

spymemcached-2.9.1.jar
memcached-session-manager-tc7-1.6.5.jar
memcached-session-manager-1.6.5.jar

CentOS 6.3, Java 6 u45, Tomcat 7.0.39

Please provide any additional information below.

Removing my custom log4j layout jars and reverting to standard Tomcat 'out of 
the box' logging results in other exceptions that ultimately lead to the same 
problem with no server start.

Original issue reported on code.google.com by eravene...@gmail.com on 15 Jul 2013 at 6:10

GoogleCodeExporter commented 9 years ago
I downloaded the latest commons-lang jar from Apache, 
commons-lang3-3.1-bin.tar.gz, and placed the jar in my tomcat/lib folder which 
did not fix the issue.

Downloaded the older version, commons-lang-2.6-bin.tar.gz, and the issue has 
been resolved.  Obvious answer to an obvious problem.  I guess I shouldn't have 
assumed that commons lang was present (though why this exception occurred only 
after adding the session management when it apparently had nothing to do with 
it, who knows?).

Original comment by eravene...@gmail.com on 15 Jul 2013 at 6:34

GoogleCodeExporter commented 9 years ago
Closed as it was caused by the missing logstash (or log4j-jsonevent-layout) 
dependency on commons-lang.

Original comment by martin.grotzke on 18 Jul 2013 at 11:16