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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]