LinkageError类时要调用Web服务方法 [英] LinkageError when calling webservice method

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

问题描述

我有一个Apache ServiceMix的它调用一个bean,这又使得一个SOAP请求(骆驼2.9)的路线。该SOAP code通过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的配置问题。请参阅: 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

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

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