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"%>
^---------------------------------------------^
^---------------------------------------------^
3、java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilder
解决方法:weblogic解析xml时和第三方包冲突,删掉WEB-INF/lib的xercesImpl.jar。