我是靠谱客的博主 善良云朵,最近开发中收集的这篇文章主要介绍WebLogic发布点Activate Changes时候出错:java.lang.LinkageError: loader constraint violation: loader,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
环境:Linux+WebLogic10.3.0.0
在项目的WEB-INF目录下,有如下weblogic.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
WebLogic里发布,如果在Linux命令行下发布,停止再启动就正常。
如果在控制台里发布,点update后,最后在点Activate Changes时候,出错,Log如下:
<2016-3-29 下午06时08分55秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [/opt/bea/user_projects/domains/domain7006/CEACCSVR/WEB-INF/classes/applicationContext-cxf.xml]; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) previously initiated loading for a different type with name "org/w3c/dom/UserDataHandler".
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [/opt/bea/user_projects/domains/domain7006/CEACCSVR/WEB-INF/classes/applicationContext-cxf.xml]; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) previously initiated loading for a different type with name "org/w3c/dom/UserDataHandler"
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
Truncated. see log file for complete stacktrace
java.lang.LinkageError: loader constraint violation: loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) previously initiated loading for a different type with name "org/w3c/dom/UserDataHandler"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:335)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:288)
Truncated. see log file for complete stacktrace
毫无疑问又是包冲 突了,我查找下我的jar包里哪个含有“org/w3c/dom/UserDataHandler”,最后找到了jaxen-1.1.2.jar,删除后再点Activate Changes,就OK了
最后
以上就是善良云朵为你收集整理的WebLogic发布点Activate Changes时候出错:java.lang.LinkageError: loader constraint violation: loader的全部内容,希望文章能够帮你解决WebLogic发布点Activate Changes时候出错:java.lang.LinkageError: loader constraint violation: loader所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复