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

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。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值