Hi,

I am having trouble parsing my config file with DOMConfigurator using Crimson.  I have 
no problems with Xerces but when I use crimson I get the exception at the end of this 
message.

Somehow, Crimson is not able to find the dtd using the SYSTEM identifier log4j.dtd.  I 
noticed there was a recent commit that added a class UtilLoggingEntityResolver.java 
with the following comment:

        // we change the system ID to a valid URI so that Crimson won't
        // complain. Indeed, "log4j.dtd" alone is not a valid URI which
        // causes Crimson to barf. The Log4jEntityResolver only cares
        // about the "log4j.dtd" ending.
  
Is there a work-around I can use for Crimson without having to use the latest CVS 
code?  As an aside I don't think log4j.dtd is an invalid value for system identifier.  
I just looked in the W3C XML spec and it has an example with another such system 
identifier. 


Thanks,
Mark

log4j:WARN Parsing error on line 1 and column -1
log4j:WARN Valid documents must have a <!DOCTYPE declaration.
log4j:ERROR Parsing error on line 1 and column -1
log4j:ERROR Document root element is missing.
log4j:ERROR Could not parse input source [EMAIL PROTECTED]
org.xml.sax.SAXParseException: Document root element is missing.
        at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
        at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:501)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)

        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl
.java:185)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:665)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:616)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java

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

Reply via email to