You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Scott Deboy <sd...@comotivsystems.com> on 2004/11/29 18:24:36 UTC
Joran not reporting config errors
I've been getting a SAXParseException (once I knew where to get the stack trace) using Joran with an existing log4j config file, but the error wasn't being propagated.
I can't see how the ExecutionContext is propagating the error list.
It doesn't look like anything calls ConfiguratorBase.dumpErrors or anything that could report startup config failure is getting the error list from the ExecutionContext.
By the way, for those with existing log4j xml config files, the system may act as if it couldn't find your config. Here's the reason:
org.xml.sax.SAXParseException: Relative URI "log4j.dtd"; can not be resolved without a base URI.
I have the -Dlog4j.debug=true in my script.
I thought I saw something on the list about having to change existing config files with 1.3 alpha. I'll go through the archives and see if something pops up, but if someone knows how to fix this (Ceki?) I'd appreciate hearing how.
Thanks
Scott
Re: Joran not reporting config errors
Posted by Ceki Gülcü <ce...@qos.ch>.
At 06:24 PM 11/29/2004, Scott Deboy wrote:
>I've been getting a SAXParseException (once I knew where to get the stack
>trace) using Joran with an existing log4j config file, but the error
>wasn't being propagated.
The error is available through joranConfigratorInstance.getErrorList().
>I can't see how the ExecutionContext is propagating the error list.
As just mentioned, it is available in joranConfigratorInstance.getErrorList().
>It doesn't look like anything calls ConfiguratorBase.dumpErrors or
>anything that could report startup config failure is getting the error
>list from the ExecutionContext.
The user has to call joranConfigratorInstance.getErrorList() on her own. Do
you have a better idea?
>By the way, for those with existing log4j xml config files, the system may
>act as if it couldn't find your config.
That should not be the case. log4j.dtd is not required but its existence
should not cause an error. Instead you should get a warning message with a
reference to
http://logging.apache.org/log4j/docs/codes.html#log4j_dtd
> Here's the reason:
>
>org.xml.sax.SAXParseException: Relative URI "log4j.dtd"; can not be
>resolved without a base URI.
>
>I have the -Dlog4j.debug=true in my script.
Joran ignores -Dlog4j.debug=true. I think -Dlog4j.debug should be deprecated...
>I thought I saw something on the list about having to change existing
>config files with 1.3 alpha. I'll go through the archives and see if
>something pops up, but if someone knows how to fix this (Ceki?) I'd
>appreciate hearing how.
The SAXParseException you are observing should not occur yet it does. :-)
I'd be interested in the stack trace and more info on your set up. JVM,
log4j version, XML parser...
>Thanks
>Scott
--
Ceki Gülcü
The complete log4j manual: http://qos.ch/eclm
Professional log4j support: http://qos.ch/log4jSupport
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org