码迷,mamicode.com
首页 > 其他好文 > 详细

ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces

时间:2014-08-06 19:15:32      阅读:236      评论:0      收藏:0      [点我收藏+]

标签:weblogic   jar   应用   web   

一、现象

有两应用,单独部署任意一个应用到weblogic下,正常运行。将两应用部署到一起,启动报:

Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration 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:324)
    at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:84)
    at com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:187)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:392)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.setResult(TransformerHandlerImpl.java:137)
    at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.setup(DomHelper.java:205)
    at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:190)
    at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:181)
    at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:167)
    at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:107)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:949)


二、解决办法

 1、复制应用下的xercesImpl-xxx.jar到weblogic domains\lib,所有应用共享此jar

2、删除受影响应用下的xerces-xxx.jar、xercesImpl-xxx.jar

前提:应用下weblogic.xml的prefer-web-inf-classes值为true(优先加载应用中的类)


webloigc参考版本:10.3.3.0

ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces,布布扣,bubuko.com

ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces

标签:weblogic   jar   应用   web   

原文地址:http://blog.csdn.net/rainbow0101/article/details/38402285

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!