tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin van Dijken" <mvdij...@madocke.nl>
Subject Logging and Classloading issues
Date Thu, 03 Jul 2003 12:16:09 GMT
I've got several problems using commons logging and log4j in Tomcat and I've been searching
on ways to solve them. The actual problem I have is the following:

org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog
does not implement Log

With of course a huge stack trace behind it. Now I found quite a few articles on the web and
some mails in the tomcat-dev list about this problem but none seem to report a fully working
solution. What I've setup is the following: 

$Tomcat_home/common/lib 
- no commons-logging nor log4j

$tomcat_home/server/lib 
- left the commons-logging there. Should be fully separate from my webapps

WEB-APP/WEB-INF/lib
- commons-logging 1.0.2
- log4j 1.2.6
- a lib requiring commons-logging

WEB-APP/WEB-INF/classes
- log4j.properties

I've found on this list that Costin solved the above exception by putting commons-logging
and log4j in the $tomcat_home/common/lib directory and removing them from the web-apps entirely.
I've tried that setup and it seems to work. The above exception is gone. The problem with
it however, is that I can't have every web-app use different appenders and verbosity settings
any more. The only log4j.properties file this setup accepts can be on a global location.

So, does anybody know of a solution that allows me to get rid of all of the "does not implement
Log" exceptions and allow me to use logging on a per-webapp base?

Martin van Dijken

P.S. It's not a choice of mine to use commons-logging instead of direct log4j. A library we
use (Kodo)requires this. Therefore I can't get rid of commons-logging as Ceki from log4j suggests:
http://www.qos.ch/logging/thinkAgain.html

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message