您的位置:首页 > 移动开发

项目从weblogic10.0.2迁移到weblogic10.3.6遇到的问题

2012-05-03 18:11 477 查看
1、java.lang.ExceptionInInitializerError和java.lang.NoClassDefFoundError,在我这,这两个错误是同时出现的。
解决方法:在WEB-INF/weblogic.xml文件中加入元素prefer-web-inf-classes,值为TRUE。下面附prefer-web-inf-classes的配置和说明。
<container-descriptor>
<prefer-web-inf-classes>
true
</prefer-web-inf-classes>
</container-descriptor>
prefer-web-inf-classes Element
The weblogic.xml Web application deployment descriptor contains a <prefer-web-inf-classes> element (a sub-element of the <container-descriptor> element). By default, this element is set to False. Setting this element to True subverts the classloader delegation model so that class definitions from the Web application are loaded in preference to class definitions in higher-level classloaders. This allows a Web application to use its own version of a third-party class, which might also be part of WebLogic Server. See weblogic.xml Deployment Descriptor Elements.
When using this feature, you must be careful not to mix instances created from the Web application's class definition with issuances created from the server's definition. If such instances are mixed, a ClassCastException results.


2、The validator class:
"org.apache.taglibs.standard.tlv.JstlCoreTLV" has failed with the following exception:
"java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory".   

<%@page contentType="text/html;charset=utf-8"%>

^---------------------------------------------^  

解决方法:出现这种情况一般是xml-apis.jar和weblogic解析器冲突导致的问题,这里,我是把xml-apis.jar从WEB-INF/lib底下删除。

3、java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilder

解决方法:weblogic解析xml时和第三方包冲突,删掉WEB-INF/lib的xercesImpl.jar。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息