1 Reply Latest reply on Mar 5, 2009 2:00 AM by Arun SasiKumar

    Xerces SAX Error in JBoss

    Robert Hughes Newbie

      Hi everybody.

      I am currently trying to upgrade an old app from JBoss 3.2.5 to the latest version in the hope of breathing some new life into it.

      I have made a number of changes suggested by the upgrade guide (changing my Datasource config etc.), however when I deploy my app am am getting some errors related apparently to xerces.

      I get this error if I try and deploy one web-app.

      14:30:08,354 ERROR [Digester] Digester.getParser:
      java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
      at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)


      I get this error when I try and access the other web-app (which seems to deploy ok). I have checked the org.apache.xerces.parsers.SAXParser class I am using and it definitely implements XMLReader).

      org.jdom.JDOMException: Could not load default SAX parser: org.apache.xerces.parsers.SAXParser: SAX2 driver class org.apache.xerces.parsers.SAXParser does not implement XMLReader

      I also have an ear which seems to deploy ok.

      I am using JBoss 4.0.5 and have recompiled the application against the xercesimpl.jar and xml-api.jar files found in JBoss?s lib/endorsed folder. There are no other versions of xerces in any of my ears or wars ? just that version. My initial research leads me to believe this is a class-loading issue and that maybe my default sax parser is incorrect?

      Could it be that Java 1.5 (which i am using) loads another sax parser or maybe one of JBoss's subcomponents (Tomcat) has a different version? I have no idea how to continue.

      Anybody got any ideas?

      Thanks for your time.
      Robert Hughes