On Mar 16, 2005, at 8:12 AM, Jason Roscoe wrote:


I tried using 1.2.9 (stable) and I was able to get the RollingFileAppend to
work. When I try running my application from a command line, I get this
error:


Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/log4j/Category

Here is my full config file:


This looks like a classpath issue, not a configuration issue. org.apache.log4j.Category was the original name for Logger and is still in the jar to support older applications but is deprecated. So it is likely that you have a class that uses Category, but your classpath is not set up to find the log4j jar.


You can confirm that o.a.l.Category is in your jar file by:

jar -tf log4j-1.2.9.jar | grep Category.class

You can check if it is on your classpath by

java [classpath stuff] org.apache.log4j.Category

if you get a NoClassDefFoundError, then log4j isn't on your classpath. If you get a NoSuchMethodError, then it is on you classpath and it just can't find a main method.

If you have any control over the application that was using Category, you should migrate Category to Logger and Priority to Level.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to