DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21367>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21367

log4j:ERROR Ignoring configuration file [nulllog4j.properties].

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED



------- Additional Comments From [EMAIL PROTECTED]  2003-07-08 05:43 -------
I think the problem is perfectly clear.  This is niether a Tomcat nor a Log4j
issue.  It is a user issue.  An absolute path is being passed to the log4j
property configurator.  However, the path obtained from getRealPath("/") is
null.  This is most likely because the webapp is being served directly from a
.war file, in which case there is no file system access to the contents of the
webapp.  In other words, the error is in the user's assumption that
getRealPath("/") will always return a non-null path which is absolutely false.

The solution is quite simple; use
context.getResourceAsStream(getInitParameter("propfile")).  This returns an
input stream which will work 100% of the time whether the app is being served
off the file system or from within a .war file.  Make sure to make the
"propfile" path relative to the webapp such as "/WEB-INF/log4j.properties".

Verifying the bug as invalid.

Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to