2 Replies Latest reply on Feb 1, 2011 4:02 AM by Ivaylo Petrov

    Problem with xercesImpl.jar while tring to use NEKO parser - ClassCastException

    Ivaylo Petrov Newbie

      Hi!

       

      I am running JBoss Web 2.1.9.GA. I want to use NEKO xmlparser. For that purpose I need xerces (or so it seems). I tried to add resolver.jar, serializer.jar, xml-apis.jar, xercesImpl.jar and nekohtml.jar.

       

      This is my web.xml configuration

       

         <context-param>

            <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>

            <param-value>NEKO</param-value>

         </context-param>

         <context-param>

            <param-name>org.ajax4jsf.xmlparser.NEKO</param-name>

            <param-value>.*\..*</param-value>

         </context-param>

      I get the following exception while deploying:

       

      Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration

                at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)

                at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)

                at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)

                at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)

                at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:328)

                at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:88)

                at com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:191)

                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:396)

                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:302)

                at org.springframework.xml.transform.TransformerObjectSupport.transform(TransformerObjectSupport.java:112)

                at org.springframework.ws.wsdl.wsdl11.provider.InliningXsdSchemaTypesProvider.getSchemaElement(InliningXsdSchemaTypesProvider.java:113)

                at org.springframework.ws.wsdl.wsdl11.provider.InliningXsdSchemaTypesProvider.addTypes(InliningXsdSchemaTypesProvider.java:101)

                at org.springframework.ws.wsdl.wsdl11.ProviderBasedWsdl4jDefinition.afterPropertiesSet(ProviderBasedWsdl4jDefinition.java:233)

                at org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition.afterPropertiesSet(DefaultWsdl11Definition.java:170)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)

                ... 49 more

       

      I tried to remove some of the jars (xml-apis and/or xercesImpl), but this didn't help.

       

      I saw that sometimes this exception is caused by the classloder, but I just cannot think of a way to fix/investigate this.

       

      A little bit confusing is also that all seems to be running when I start the application from eclipse.

       

      Any help will be appreciated.

      Ivaylo Petrov