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 Steven Leija <St...@valtech.com> on 2001/08/22 00:50:12 UTC

Xerces 1.4.3?

Hello All,
 
I'm trying to get an xml configuration for my Logger.  After much
frustration, I get the following exception:
 
Exception in thread "main" java.lang.NoSuchMethodError
        at
org.apache.crimson.tree.XmlDocumentBuilder.startDTD(XmlDocumentBuilder.java:
633)
        at
org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1119)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
        at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
        at
org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:1
85)
        at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:592)
        at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:527)
        at
org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:606)
        at Logger.log(Logger.java:16)
        at Logger.log(Logger.java:11)
        at Logger.main(Logger.java:42)
 
It was pointed out that this is my xml parser problem.  I'm not using
crimson, I'm using the latest Xerces parser.  Is anyone else having this
problem?  Can someone shed some light on this situation?

Have a good one, 

Steven 

ps, Thanks Mark for your help!

Re: Xerces 1.4.3?

Posted by Paul Glezen <pg...@atdial.net>.
> Steven Leija wrote:
> 
> Hello All,
> 
> I'm trying to get an xml configuration for my Logger.  After much
> frustration, I get the following exception:
> 
> Exception in thread "main" java.lang.NoSuchMethodError
>         at
> org.apache.crimson.tree.XmlDocumentBuilder.startDTD(XmlDocumentBuilder.java:633)
>         at
> org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1119)
>         at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
>         at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
>         at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
>         at
> org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
>         at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:592)
>         at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:527)
>         at
> org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:606)
>         at Logger.log(Logger.java:16)
>         at Logger.log(Logger.java:11)
>         at Logger.main(Logger.java:42)
> 
> It was pointed out that this is my xml parser problem.  I'm not using
> crimson, I'm using the latest Xerces parser.  Is anyone else having
> this problem?  Can someone shed some light on this situation?
> 

Steve,

It looks to me like you have jaxp.jar in your classpath in front of your
xerces.jar.  If this is the case, you are indeed using Crimson (as the
above stack trace indicates).  Crimson is Sun's reference
implemenation.  With xerces.jar in your classpath, you don't even need
jaxp.jar (the jaxp interfaces are included in xerces.jar).  So it's best
to get it out of your classpath altogether.

- Paul
-- 
Beware of bugs in the above code.  I have
only proved it correct, not tried it.
-Don Knuth

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