关于springmvc+cxf 并且通过weblogic包冲突的问题

Lee-ocean 2016-11-22 11:46:05
####<2016-11-22 下午09时51分12秒 CST> <Warning> <HTTP> <ocean-PC> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1479822672566> <BEA-101162> <User defined listener com.oracle.weblogic.wsee.wrapper.org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testService': Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.cxf.common.jaxb.JAXBUtils$1.createOutput(Ljava/lang/String;Ljava/lang/String;)Ljavax/xml/transform/Result;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/common/jaxb/JAXBUtils$1, and its superclass loader (instance of <bootloader>), have different Class objects for the type tring;Ljava/lang/String;)Ljavax/xml/transform/Result; used in the signature.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testService': Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.cxf.common.jaxb.JAXBUtils$1.createOutput(Ljava/lang/String;Ljava/lang/String;)Ljavax/xml/transform/Result;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/common/jaxb/JAXBUtils$1, and its superclass loader (instance of <bootloader>), have different Class objects for the type tring;Ljava/lang/String;)Ljavax/xml/transform/Result; used in the signature

Caused By: java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.cxf.common.jaxb.JAXBUtils$1.createOutput(Ljava/lang/String;Ljava/lang/String;)Ljavax/xml/transform/Result;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/common/jaxb/JAXBUtils$1, and its superclass loader (instance of <bootloader>), have different Class objects for the type tring;Ljava/lang/String;)Ljavax/xml/transform/Result; used in the signature

第一次提问,不会格式,有点辣眼睛请见谅。字面上的意思貌似是cxf的这个冲突了org.apache.cxf.common.jaxb.JAXBUtils,但是认真检查过,jar包只有一个。。。。求解答
...全文
353 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
tianfang 2016-11-24
  • 打赏
  • 举报
回复
weblogic.xml 放在war的根目录下
Lee-ocean 2016-11-23
  • 打赏
  • 举报
回复
百度过知道了是包冲突
Lee-ocean 2016-11-23
  • 打赏
  • 举报
回复
之前加了,放在web-inf下没有起作用
引用 2 楼 tianfang 的回复:
weblogic使用自带的jar包,没有加载你war包中的jar,强制使用war包中jar: war包根目录增加配置文件 weblogic.xml


<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
	<container-descriptor>
		<prefer-web-inf-classes>true</prefer-web-inf-classes>
	</container-descriptor>
</weblogic-web-app>
tianfang 2016-11-23
  • 打赏
  • 举报
回复
weblogic使用自带的jar包,没有加载你war包中的jar,强制使用war包中jar: war包根目录增加配置文件 weblogic.xml


<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
	<container-descriptor>
		<prefer-web-inf-classes>true</prefer-web-inf-classes>
	</container-descriptor>
</weblogic-web-app>

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧