nsr, I solved the problem in another fashion. I had the log4j.jar in the lib-dir under Tomcat. Since Tomcat uses different classloaders to load the webapps, and the log4j.jar wasn't under the path the classloader was searching, log4j couldn't find the log4j.properties file. I solved the problem by putting log4j.jar in my WEB-INF\lib dir.
Mvd -----Original Message----- From: Srinivasarao Nandiwada [mailto:[EMAIL PROTECTED]] Sent: maandag 15 april 2002 18:18 To: Log4J Users List Subject: Re: No appenders found You may want to pass getClass().getResource("log4j.properties") to property configurator. -nsr [EMAIL PROTECTED] wrote: > Hey everybody, > > I read a few posts about errors on using log4j from a appserver. I'm using Tomcat >4.0.1 and I have the same problem. Now I tried a solution someone posted to have an >initservlet configure the log4j-system. > > What seems to be the problem, is that the WEB-INF\classes dir is not searched in >order to find the log4j.properties file. When I ran >PropertyManager.configure("log4j.properties"), I received a FileNotFoundException. I >checked it, and the log4.properties file really is in my WEB-INF\classes dir. Next, I >checked if this has something to do with my classpath, but it doesn't. I added the >directory WEB-INF\classes to the classpath in tomcat, but that didn't change >anything. > > Anybody got any good ideas on how to solve this problem? It'd be much appreciated. > > Martin van Dijken > [EMAIL PROTECTED] > Madocke Interactive Media > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
