How do I use logback-access in combination with Tomcat 5.5?

Posted by mcduke on Stack Overflow See other posts from Stack Overflow or by mcduke
Published on 2009-05-12T19:26:28Z Indexed on 2010/05/28 11:21 UTC
Read the original article Hit count: 505

Filed under:
|
|
|

I've got several Web apps running on a Tomcat 5.5 server, and I'm working on improving/updating the overall logging system used throughout the system. I already had some success with logback-classic. However, when I try to use logback-access (i.e. access the lbAccessStatus servlet), I get this exception:

exception

javax.servlet.ServletException:
  Wrapper cannot find servlet class
    ch.qos.logback.access.ViewStatusMessagesServlet
  or a class it depends on

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
...

root cause

java.lang.ClassNotFoundException:
  ch.qos.logback.access.ViewStatusMessagesServlet

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
...

I have everything set up according to the docs:

  common/lib:
    logback-classic-0.9.15.jar
    logback-core-0.9.15.jar
  server/lib:
    logback-access-0.9.15.jar

Moving around the libraries doesn't seem to help. logback-classic seems to work fine, it's just logback-access that causes problems.

© Stack Overflow or respective owner

Related posts about java

Related posts about tomcat