[logback-user] NoClassDefFoundError when activating LogbackValve(hogback-access) in tomcat

John Lawrence Dowson jldowson at gmail.com
Thu Sep 10 18:03:24 CEST 2015


Hi,

I am trying to use the LogbackValve but am getting the following error (and tomcat fails to start) when adding the valve to the CATALINA_BASE/conf/server.xml file:

ERROR main  org.apache.tomcat.util.digester.Digester - Begin event threw error
java.lang.NoClassDefFoundError: org/apache/catalina/Lifecycle
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_04]
…
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.Lifecycle
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_04]
…

Environment is as follows:
   Tomcat 7.0.57 (with APR)
   logback 1.1.3
with the tomcat environment being set with the following  CATALINA_BASE/bin/setenv.sh file:

#!/bin/sh
CLASSPATH=$CLASSPATH:$CATALINA_BASE/bin/jul-to-slf4j-1.7.12.jar:\
$CATALINA_BASE/bin/jcl-over-slf4j-1.7.12.jar:\
$CATALINA_BASE/bin/slf4j-api-1.7.12.jar:\
$CATALINA_BASE/bin/logback-core-1.1.3.jar:\
$CATALINA_BASE/bin/logback-classic-1.1.3.jar:\
$CATALINA_BASE/bin/logback-access-1.1.3.jar:\
$CATALINA_BASE/bin/logback-config/

This seems strange to me as the Lifecycle interface should be available in the catalina.jar file, which must be on the class path…..

Any ideas?

Thanks in advance,

John




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20150910/ea0b4c31/attachment.html>


More information about the Logback-user mailing list