调用 webservice 方法时出现 LinkageError [英] LinkageError when calling webservice method

查看:30
本文介绍了调用 webservice 方法时出现 LinkageError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个调用 bean 的 apache servicemix (camel 2.9) 路由,该路由又发出 SOAP 请求.SOAP 代码是通过 wsdl2java 生成的并且工作正常(cxf 2.4.0).我遇到的问题是当抛出 SOAP 错误时,我得到以下问题:

I have an apache servicemix (camel 2.9) route which calls a bean, that in turn makes a SOAP request. The SOAP code is generated via wsdl2java and works fine (cxf 2.4.0). The problem i have is when a SOAP fault is thrown, i get the following issue:

Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "javax/xml/soap/SOAPFault"
    at javax.xml.ws.soap.SOAPFaultException.<init>(SOAPFaultException.java:28)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)[175:org.apache.cxf.bundle:2.5.0.fuse-7-061]
    at $Proxy120.catalogProductAttributeMediaRemove(Unknown Source)
    at com.boohoo.magento.MagentoProducts.deleteImageFromProduct(MagentoProducts.java:403)[769:magento-soap-api:1.0.0.SNAPSHOT]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_29]
    at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:340)
    at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:237)
    at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:166)

通过一些谷歌搜索(我的背景是 C#),错误似乎表明该类已被多次加载,但我看不出这是怎么可能的,因为 SOAPFaultException 不是我的类之一.

From a bit of googling (my background is C#) the error seems to be stating that the class has been loaded multiple times, but i dont see see how this is possible since SOAPFaultException isnt one of my classes.

有什么想法吗?

干杯.

推荐答案

我发现是 servicemix config 的问题.请参阅:http://fusesource.com/forums/thread.jspa?threadID=4016

I found out it was a problem with servicemix config. See: http://fusesource.com/forums/thread.jspa?threadID=4016

这篇关于调用 webservice 方法时出现 LinkageError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆