Xincludeawareparserconfiguration cannot be cast to Org.apache.xerces.xni.parser.XMLParserConfigurat

Source: Internet
Author: User
Tags addchild

Single context, configuration no problem
But when a Tomcat has two context (all with richfaces), it doesn't start up, error
Com.sun.faces.config.ConfigurationException:CONFIGURATION failed! Org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to Org.apache.xerces.xni.parser.XMLParserConfiguration
At Com.sun.faces.config.ConfigManager.initialize (configmanager.java:213)
At Com.sun.faces.config.ConfigureListener.contextInitialized (configurelistener.java:196)
At Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:3843)
At Org.apache.catalina.core.StandardContext.start (standardcontext.java:4342)
At Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:791)
At Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:771)
At Org.apache.catalina.core.StandardHost.addChild (standardhost.java:525)
At Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:926)
At Org.apache.catalina.startup.HostConfig.deployDirectories (hostconfig.java:889)
At Org.apache.catalina.startup.HostConfig.deployApps (hostconfig.java:492)
At Org.apache.catalina.startup.HostConfig.start (hostconfig.java:1149)
At Org.apache.catalina.startup.HostConfig.lifecycleEvent (hostconfig.java:311)
At Org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (lifecyclesupport.java:117)
At Org.apache.catalina.core.ContainerBase.start (containerbase.java:1053)
At Org.apache.catalina.core.StandardHost.start (standardhost.java:719)
At Org.apache.catalina.core.ContainerBase.start (containerbase.java:1045)
At Org.apache.catalina.core.StandardEngine.start (standardengine.java:443)
At Org.apache.catalina.core.StandardService.start (standardservice.java:516)
At Org.apache.catalina.core.StandardServer.start (standardserver.java:710)
At Org.apache.catalina.startup.Catalina.start (catalina.java:578)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)
At Java.lang.reflect.Method.invoke (method.java:597)
At Org.apache.catalina.startup.Bootstrap.start (bootstrap.java:288)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:413)
Caused By:java.lang.ClassCastException:org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot is cast to Org.apache.xerces.xni.parser.XMLParserConfiguration


Then the Xercesimpl.jar file in a Lib is deleted, and 2 can start up.
It's strange ... Somehow
But while it's starting up, some programs that use Ajax can go wrong.

Java.lang.noclassdeffounderror:org/apache/xerces/xni/parser/xmlconfigurationexception
Org.ajax4jsf.webapp.configurablexmlfilter$nekoparserconfig.createparser (configurablexmlfilter.java:162)
Org.ajax4jsf.webapp.ParserConfig.getParser (parserconfig.java:49)
Org.ajax4jsf.webapp.ConfigurableXMLFilter.getParser (configurablexmlfilter.java:130)

Commiseration Ah ...

------------------------------------------------------
Come up with a way: Move Xercesimpl.jar to the Tomcat/lib directory
---------------

Reproduced

Delete the Xercesimpl.jar from the two items and put them under Tomcat/lib

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.