Re: Error loading log4j properties file

From: yzzzzz (lg83news_at_free.fr)
Date: 03/30/05


Date: Wed, 30 Mar 2005 13:10:18 +0200

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

yzzzzz wrote:
> 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.



Relevant Pages

  • Error loading log4j properties file
    ... I am using log4j for logging, ... HOWEVER, if I restart tomcat, everything works fine, I get no errors, ... log4j:ERROR Could not read configuration file from URL ... log4j:WARN Please initialize the log4j system properly. ...
    (comp.lang.java.programmer)
  • XP Pro User - Cant Find W2K Domain
    ... I am having a strange problem with a user logging onto a W2K domain ... the system pauses for a bit and then states that no domain controller ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Windows Explorer always starts on Logon
    ... > Strange problem with WinXP. ... After logging on, Windows Explorer starts ...
    (microsoft.public.windowsxp.general)
  • Strange behaviour after office change
    ... I'm having a strange problem with a Sun E 4500: we just moved from our old ... /dev/rdsk/c0t2d0s3: is logging. ... Setting netmask of hme0 to 255.255.0.0 ... at this point the server can be pinged from other servers but won't accept ...
    (SunManagers)
  • IIS ODBC Logging causing problems with ASP.Net SQLClient database access
    ... I run into a strange problem today while enableding ODBC SQL logging on my ... IIS Server. ... Once the logging was enabled, and working fine, my two ASP.Net Applications ...
    (microsoft.public.inetserver.iis)