Error loading log4j properties file

Y

yzzzzz

Hello,

I am experiencing a very strange problem. I am using log4j for logging,
and I *do* have a log4j.properties at the root of my source hierarchy
(in the same directory as all my other .properties files).

However I keep getting these errors saying the file can't be found. I
have checked myself, using:
mkdir /tmp/a
cd /tmp/a
unzip /opt/***/webapp/WEB-INF/lib/***.jar
vi log4j.properties
The file is THERE!! I am absolutely positive!! But I still get the
errors below every time I restart a webapp (using manager).

HOWEVER, if I restart tomcat, everything works fine, I get no errors,
and the logging works too. This means I have to restart tomcat every
time I recompile, which is quite time consuming.

Any help greatly appreciated. Thanks.


(the stars *** are the name of the project)

Mar 29, 2005 6:46:02 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
log4j:ERROR Could not read configuration file from URL
[jar:file:/opt/***/webapp/WEB-INF/lib/***.jar!/log4j.properties].
java.io.FileNotFoundException: JAR entry log4j.properties not found in
/opt/***/webapp/WEB-INF/lib/***.jar
at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:97)
at
sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:107)
.......
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
log4j:ERROR Ignoring configuration file
[jar:file:/opt/***/webapp/WEB-INF/lib/***.jar!/log4j.properties].
log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
 
Y

yzzzzz

Solved the problem by deleting the jar file in
project/webapp/WEB-INF/lib (using the one in tomcat/common/lib instead)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top