2012/5/25 Hermes Flying <flyingher...@yahoo.com>: > Hi, > > I have upgraded from Tomcat 5.5 to Tomcat 6.0.35 > I am getting java.lang.NoClassDefFoundError: > org.apache.commons.logging.LogFactory > I didn't have this problem before. > Note that I have commons-logging already in my web apps WEB-INF\lib > And this exception is from a class (custom class) running from a jar in > %TOMCAT_HOME%\lib > > If I drop commons-logging in %TOMCAT_HOME%\lib the exception does not happen > BUT now I get exceptions in log4j from inside my web app. > I tried also deleting the commons-logging from > %TOMCAT_HOME%\webapps\myApp\WEB-INF\lib but no success. > > Any idea what is the problem here?
Your description is too generic to say. You do not say what jars are exactly where and what actual configuration (server.xml and logging) you have. See 1) "Class Loading" page in documentation. Placing custom jars into %TOMCAT_HOME%\lib is usually a bad idea. I'd suspect that one of them is the culprit. 2) "Logging" page in documentation. Compare it with your configuration. It might be that you config matches some of the steps for "enabling log4j" described there, but not all of them. Note that using log4j in Tomcat is not the default configuration. 3) Apache Commons Logging documentation http://commons.apache.org/logging/guide.html Especially how commons-logging switches between java.util.logging and log4j (preferring the latter if it is available). Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org