You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steven Cummings <cu...@netscape.net> on 2002/06/13 19:06:18 UTC

Xerces SAXParser does not implement XMLReader?

I'm having a problem lately with using Xerces-J 2.0.1 lately under Tomcat that I never seemed to have before. Perhaps it's the version that is incorrect because it seems that Tomcat used Xerces before. The weird thing about this problem is that it doesn't always show up in similiar test cases. I came across it while tring to set up Cocoon 2.0.2.

On my WinXP machine running Tomcat 4.0.3, Xerces 2.0.1, using the xml-api.jar from Xalan-2.3.1, and the latest cocoon, I can get the front cocoon page to run, but a lot of the samples bomb out with exception messages (I don't have one on hand now unfortunately).

On a RedHat 6.2 box, using JDK 1.3.1, Tomcat 4.0.3, and the same cocoon/xerces/xalan configuration, I get the following error even when tring to access the root of the cocoon webapp:

type fatal

message SAX2 driver class org.apache.xerces.parsers.SAXParser does not implement XMLReader

description java.lang.ClassCastException: org.apache.xerces.parsers.StandardParserConfiguration

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

stack-trace

java.lang.ClassCastException: org.apache.xerces.parsers.StandardParserConfiguration
    at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
    at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
    at org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.generateCode(AbstractMarkupLanguage.java:377)
    at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:365)
    at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:328)
    at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:291)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:270)
    at java.lang.Thread.run(Thread.java:484)

request-uri

/cocoon/

I looked through the Xerces sources, and it does seem to be the case that the xerces SAXParser from 2.0.1 does not implement XMLReader, even through inheritance. So apparently Tomcat wants to use it through JAXP, and my main question is why does this error only show up part of the time. Is there an incompatibility with Tomcat 4.0.X and the latest Xerces? Sorry for the post to multiple lists, but I'm not yet sure of where the problem really lies. Thank you!

/S

-- 
Steven Cummings <cu...@netscape.net>
Columbia, MO



__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>