Is log4j in your classpath twice? On Wed, 16 Mar 2005 12:53:59 -0500, Jason Roscoe <[EMAIL PROTECTED]> wrote: > > I am running on a windows machine, so I can't use your jar command to grep > for Category.class. If I open up my log4j jar, under org.apache.log4j, I > have a Category.class file. > > I ran this: > > java -classpath "..\lib\classes\log4j-1.2.9.jar" org.apache.log4j.Category > > and got Exception in thread "main" java.lang.NoClassDefFoundError: > org/apache/log4j/Categoy. So I guess log4j isn't on my classpath (rmember, > I am running this on a windows machine right now). > > Where do I change Category to Logger? In my application, I have > > import org.apache.log4j.Logger; > > -----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] > >
-- James Stauffer Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]