Michiel Meeuwissen wrote:
> Michiel Meeuwissen <[EMAIL PROTECTED]> wrote:
> > My DOMConfigurator xml starts something like this:
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <!DOCTYPE log4j SYSTEM "log4j.dtd" [ ...
> >
> > But then it does not work because it cannot find the dtd:
> >
> > 21:19:14,125 FATAL STDERR println.? - org.xml.sax.SAXParseException: File
>"jndi:/bigdisk/dev/lib/test/log4j.jar/org/apache/log4j/xml/file:log4j.dtd" not found.
> []
> > But I'm sure that on the given location there is a log4j.dtd, so why
> > does it say that it cannot find?
>
> No-one reacted, and I still did not solve this problem.
>
i have a solution but you might not like it :-)
IMHO this is more a problem with the parser (xerces) rather than log4j.
xerces always tries to load the DTD even when it's not going to do any validating.
if it can't load the resource, it coughs up a nasty error and dies.
this is one of my pet peeves and i am nearly - but not quite - fed up enough to
actually do something about it.
there is a workaround - remove the doctype and the namespace definition from your xml.
i'm pretty sure log4j doesn't actually validate the xml (maybe somebody who knows more
might like to jump in here)
so getting rid of the DOCTYPE is safe - and will improve the parse speed :-)
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]