我有一个链接错误,似乎 Jboss (5.2) 提供了该类的一个版本,org.apache.cxf.jaxb.attachment.JAXBAttachmentMarchaller
而我在某处提供了该类的另一个实现。我已经搜索了这个类,它是cxf-rt-databinding-jaxb
包含它的 maven 项目,所以我已经从使用 Apache CXF 的依赖项中排除了该项目,但错误仍然存在。
我不太了解错误消息,尤其是部分...对于类型shaller.addMtomAttachment(Ljavax/activation/DataHandler; Ljava/lang/String;Ljava/lang/String;)Ljava/lang/有不同的Class对象细绳;
- 什么是shaller?变量的方法调用如何成为类型?
- 如何找到负责打包
JAXBAttachmentMarchaller
到项目中的依赖项?
如果此问题有其他解决方案,请纠正我。
java.lang.LinkageError: loader constraint violation: when resolving overridden method
"org.apache.cxf.jaxb.attachment.JAXBAttachmentMarshaller
.addMtomAttachment(Ljavax/activation/DataHandler;Ljava/lang/String;
Ljava/lang/String;)Ljava/lang/String;"
the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader)
of the current class, org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller,
and its superclass loader (instance of <bootloader>), have different Class objects for
the type shaller.addMtomAttachment(Ljavax/activation/DataHandler; Ljava/lang/String;
Ljava/lang/String;)Ljava/lang/String; used in the signature
at org.apache.cxf.jaxb.JAXBDataBase.getAttachmentMarshaller(JAXBDataBase.java:82)
at org.apache.cxf.jaxb.io.DataWriterImpl.createMarshaller(DataWriterImpl.java:127)
at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:169)
at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderPart(SoapOutInterceptor.java:242)
at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart(SoapOutInterceptor.java:164)
at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:81)
at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:61)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
at com.sun.proxy.$Proxy440.getDeviceDetails(Unknown Source)
at com.company.MyMethod(MyClass.java:52)
at org.quartz.core.JobRunShell.run(JobRunShell.java:199)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)