You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Charles de Villiers <ch...@salesbid.com> on 2001/04/19 13:13:18 UTC

log4j.dtd not found

Hi,
I'm trying to use the XML config file support for LOG4J, in a servlet (Orion
server on Win2K).
The server finds the config file itself, but then when calling
DomConfigurator.configure(), I get the exception:
>>>
org.xml.sax.SAXParseException: File "log4j.dtd" not found.
>>>
I have tried:
- Putting log4j.dtd in the same directory as the XML file
- Putting it in the servlet's classpath (there is a comment in the examples
that suggests this should work)
- using an absolute path to log4j.dtd in the DOCTYPE tag
- using a relative (to the XML file) path in the DOCTYPE tag
... none of which works!
Can anyone help please?
TIA
Charles.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: log4j.dtd not found

Posted by Ceki Gülcü <cg...@qos.ch>.
Charles,

The DOMConfigurator.configure method ignores the DOCTYPE tag. It searches for the log4j.dtd itself. See
DOMConfigurator.doConfigure(InputStream input, Hierarchy hierarchy)  method on how this is done.

The problem is most definitely a classloader issue. Let me come back to you once I have studied it a bit more.

Which JDK is this by the way? Ceki 

At 13:13 19.04.2001 +0200, Charles de Villiers wrote:
>Hi,
>I'm trying to use the XML config file support for LOG4J, in a servlet (Orion
>server on Win2K).
>The server finds the config file itself, but then when calling
>DomConfigurator.configure(), I get the exception:
>>>>
>org.xml.sax.SAXParseException: File "log4j.dtd" not found.
>>>>
>I have tried:
>- Putting log4j.dtd in the same directory as the XML file
>- Putting it in the servlet's classpath (there is a comment in the examples
>that suggests this should work)
>- using an absolute path to log4j.dtd in the DOCTYPE tag
>- using a relative (to the XML file) path in the DOCTYPE tag
>... none of which works!
>Can anyone help please?
>TIA
>Charles.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org