gpt4 book ai didi

java - CXF NoSuchMethodError ClassHelper.getRealClass

转载 作者:行者123 更新时间:2023-11-30 07:56:35 25 4
gpt4 key购买 nike

简单的项目,下面是我的 gradle 依赖项。这是我声明的唯一 CXF 依赖项。还有我的 gradle 依赖项,它是由于声明的依赖项而实现的。当我运行代码时,出现以下异常。我无法弄清楚这一点。

救命!

compile(group: 'org.apache.cxf', name: 'cxf-rt-frontend-jaxrs', version:'2.7.17')

+--- org.apache.cxf:cxf-rt-frontend-jaxrs:2.7.17
| +--- org.apache.cxf:cxf-api:2.7.17
| | +--- org.codehaus.woodstox:woodstox-core-asl:4.4.1 (*)
| | +--- org.apache.ws.xmlschema:xmlschema-core:2.1.0 -> 2.2.1
| | +--- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1
| | \--- wsdl4j:wsdl4j:1.6.3
| +--- org.apache.cxf:cxf-rt-core:2.7.17
| | +--- org.apache.cxf:cxf-api:2.7.17 (*)
| | +--- com.sun.xml.bind:jaxb-impl:2.1.13 -> 2.2.11
| | \--- org.apache.ws.xmlschema:xmlschema-core:2.1.0 -> 2.2.1
| +--- javax.ws.rs:javax.ws.rs-api:2.0-m10
| +--- org.apache.cxf:cxf-rt-bindings-xml:2.7.17
| | \--- org.apache.cxf:cxf-api:2.7.17 (*)
| \--- org.apache.cxf:cxf-rt-transports-http:2.7.17
| +--- org.apache.cxf:cxf-api:2.7.17 (*)
| \--- org.apache.cxf:cxf-rt-core:2.7.17 (*)

java.lang.NoSuchMethodError: org.apache.cxf.common.util.ClassHelper.getRealClass(Lorg/apache/cxf/Bus;Ljava/lang/Object;)Ljava/lang/Class;
at org.apache.cxf.jaxrs.provider.ProviderFactory.setCommonProviders(ProviderFactory.java:499)
at org.apache.cxf.jaxrs.client.ClientProviderFactory.setProviders(ClientProviderFactory.java:85)
at org.apache.cxf.jaxrs.provider.ProviderFactory.initBaseFactory(ProviderFactory.java:137)
at org.apache.cxf.jaxrs.client.ClientProviderFactory.initBaseFactory(ClientProviderFactory.java:77)
at org.apache.cxf.jaxrs.client.ClientProviderFactory.createInstance(ClientProviderFactory.java:56)
at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.initClient(JAXRSClientFactoryBean.java:377)
at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:225)
at org.apache.cxf.jaxrs.client.WebClient.create(WebClient.java:113)

最佳答案

java.lang.NoSuchMethodError 通常是当您使用新的 API jar 但实现仍然是旧的,没有实现新方法时。我建议您检查 jar 的版本,看看是否准确。如果您修复版本,则不会看到此错误。

关于java - CXF NoSuchMethodError ClassHelper.getRealClass,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32594172/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com