logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Stauffer" <stauffer.ja...@gmail.com>
Subject Re: java.lang.NoClassDefFoundError: org/apache/log4j/Category
Date Mon, 10 Jul 2006 11:45:23 GMT
Please give the stack trace for the exception.

On 7/8/06, Dmitry S. Kravchenko <dims@vsetech.ru> wrote:
> I'm insuccessfully trying to use log4j in Tomcat webapps.
>
> Recently I tried to recognize, where I should put jar and property files to
> make system work. I found, that if I put jar file in global lib directory,
> and properties file in WEB-INF/classes directory, system does not ever start
> with the message "No appenders could be found to the logger".
>
> Then I found, that this error disappears, when I delete log4j jar from
> global directory and put it only to the directory WEB-INF/lib (what itself
> is very strange for me. why something should change because of position of
> some jar file???).
>
> So, after I put files into these directories, server able to start
> successfully.
>
> But now I can't open any page from my web application, because I have the
> following exception:
>
> java.lang.NoClassDefFoundError: org/apache/log4j/Category
>
> The absurdity of situation is that I don't use Category class, because it
> said to me, that it is obsolete!
>
> I have some servlets, I have some class with the following code in
> constructor
>
> if( logger == null ) {
>       logger = Logger.getLogger("MetSession");
>     }
>
> (logger is static)
>
> and the following code for logging
>
> logger.debug( prefix + message );
>
> Of course class Category exists in jar file.
>
> So what I can do?
>
> Thank you.
>
> Dims.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message