I was able to get this to run on a linux box, adding a manifest file with
the classpaths in there.  But, when I try to run the same jar file on my
windows box, I get Exception in thread "main"
java.lang.NoClassDefFoundError: org/apache/log4j/Category

Could this have something to do with my windows classpath missing something?

-----Original Message-----
From: Curt Arnold [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 16, 2005 12:34 PM
To: Log4J Users List
Subject: Re: RollingFileAppender


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]




Disclaimer: This e-mail message is intended only for the personal use of 
the recipient(s) named above.  If you are not an intended recipient, you 
may not review, copy or distribute this message. If you have received this
communication in error, please notify us immediately by e-mail and delete 
the original message.
This e-mail expresses views only of the sender, which are not to be 
attributed to Rite Aid Corporation and may not be copied or distributed 
without this statement.

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

Reply via email to