java.lang.AbstractMethodError: org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduitFactory.createConduit

huangapple go评论65阅读模式
英文:

java.lang.AbstractMethodError: org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduitFactory.createConduit

问题

我在以下行代码上遇到错误:

final Client client = ClientProxy.getClient(port);
final HTTPConduit httpConduit = (HTTPConduit) client.getConduit(); //此行出错
final HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setReceiveTimeout(receiveTimeout);
httpConduit.setClient(httpClientPolicy);

并且出现以下错误:

org.springframework.beans.factory.BeanCreationException: 在类路径资源[META-INF/spring/beans.xml]中定义的名称为'scopedTarget.RestSvc'的bean创建失败;bean的实例化失败,嵌套异常是org.springframework.beans.BeanInstantiationException: 实例化[com.org.project.rest.MyRestService]失败:构造函数抛出异常;嵌套异常是java.lang.AbstractMethodError:org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduitFactory.createConduit(Lorg/apache/cxf/transport/http/HTTPTransportFactory;Lorg/apache/cxf/Bus;Lorg/apache/cxf/service/model/EndpointInfo;Lorg/apache/cxf/ws/addressing/EndpointReferenceType;)Lorg/apache/cxf/transport/http/HTTPConduit;

这里是mvn dependency:tree的输出:

[INFO] com.org.projectds:rest-project:jar:1.0-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.3.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.3.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.3.0.RELEASE:compile
...

希望这些信息能帮助您解决问题。如果需要更多帮助,请提供更多上下文或详细信息。

英文:

I am getting error on below line

        final Client client = ClientProxy.getClient(port);
        final HTTPConduit httpConduit = (HTTPConduit) client.getConduit(); //error on this line
        final HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
        httpClientPolicy.setReceiveTimeout(receiveTimeout);
        httpConduit.setClient(httpClientPolicy);

and getting error

 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.RestSvc' defined in class path resource [META-INF/spring/beans.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.org.project.rest.MyRestService]: Constructor threw exception; nested exception is java.lang.AbstractMethodError: org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduitFactory.createConduit(Lorg/apache/cxf/transport/http/HTTPTransportFactory;Lorg/apache/cxf/Bus;Lorg/apache/cxf/service/model/EndpointInfo;Lorg/apache/cxf/ws/addressing/EndpointReferenceType;)Lorg/apache/cxf/transport/http/HTTPConduit;
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1320) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:895) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at com.org.project.BootApplication.main(BootApplication.java:20) [classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.org.project.rest.MyRestService]: Constructor threw exception; nested exception is java.lang.AbstractMethodError: org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduitFactory.createConduit(Lorg/apache/cxf/transport/http/HTTPTransportFactory;Lorg/apache/cxf/Bus;Lorg/apache/cxf/service/model/EndpointInfo;Lorg/apache/cxf/ws/addressing/EndpointReferenceType;)Lorg/apache/cxf/transport/http/HTTPConduit;
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:217) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1312) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	... 18 common frames omitted
Caused by: java.lang.AbstractMethodError: org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduitFactory.createConduit(Lorg/apache/cxf/transport/http/HTTPTransportFactory;Lorg/apache/cxf/Bus;Lorg/apache/cxf/service/model/EndpointInfo;Lorg/apache/cxf/ws/addressing/EndpointReferenceType;)Lorg/apache/cxf/transport/http/HTTPConduit;
	at org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTransportFactory.java:233) ~[cxf-rt-transports-http-3.3.7.jar:3.3.7]
	at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:226) ~[cxf-rt-bindings-soap-3.3.7.jar:3.3.7]
	at org.apache.cxf.endpoint.AbstractConduitSelector.createConduit(AbstractConduitSelector.java:151) ~[cxf-core-3.3.7.jar:3.3.7]
	at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:108) ~[cxf-core-3.3.7.jar:3.3.7]
	at org.apache.cxf.endpoint.UpfrontConduitSelector.selectConduit(UpfrontConduitSelector.java:77) ~[cxf-core-3.3.7.jar:3.3.7]
	at org.apache.cxf.endpoint.ClientImpl.getConduit(ClientImpl.java:881) ~[cxf-core-3.3.7.jar:3.3.7]
	at com.org.project.rest.MyRestService.init(RestService.java:1855) ~[classes/:na]
	at com.org.project.rest.MyRestService.<init>(RestService.java:215) ~[classes/:na]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_241]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_241]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_241]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_241]
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:204) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	... 20 common frames omitted

here is the mvn dependency:tree output

    [INFO] com.org.projectds:rest-project:jar:1.0-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.3.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.3.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.3.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.3.0.RELEASE:compile
[INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.2:compile
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.13.2:compile
[INFO] |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] |  +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] |  +- org.springframework:spring-core:jar:5.2.6.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.2.6.RELEASE:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.26:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.3.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.3.0.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.11.0:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.0:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.11.0:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.0:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.0:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.0:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.3.0.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.35:compile
[INFO] |  |  +- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.35:compile
[INFO] |  +- org.springframework:spring-web:jar:5.2.6.RELEASE:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.2.6.RELEASE:compile
[INFO] |     +- org.springframework:spring-aop:jar:5.2.6.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.2.6.RELEASE:compile
[INFO] +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:3.3.7:compile
[INFO] |  +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] |  +- org.ow2.asm:asm:jar:8.0.1:compile
[INFO] |  +- org.apache.cxf:cxf-core:jar:3.3.7:compile
[INFO] |  |  +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.3:compile
[INFO] |  |  |  +- org.glassfish.jaxb:txw2:jar:2.3.3:compile
[INFO] |  |  |  +- com.sun.istack:istack-commons-runtime:jar:3.0.11:compile
[INFO] |  |  |  \- com.sun.activation:jakarta.activation:jar:1.2.2:runtime
[INFO] |  |  +- com.fasterxml.woodstox:woodstox-core:jar:5.0.3:compile
[INFO] |  |  +- org.apache.ws.xmlschema:xmlschema-core:jar:2.2.5:compile
[INFO] |  |  \- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] |  |     \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] |  +- org.apache.cxf:cxf-rt-bindings-soap:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-wsdl:jar:3.3.7:compile
[INFO] |  |  \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:3.3.7:compile
[INFO] |  +- org.apache.cxf:cxf-rt-bindings-xml:jar:3.3.7:compile
[INFO] |  +- org.apache.cxf:cxf-rt-frontend-simple:jar:3.3.7:compile
[INFO] |  \- org.apache.cxf:cxf-rt-ws-addr:jar:3.3.7:compile
[INFO] |     \- org.apache.cxf:cxf-rt-ws-policy:jar:3.3.7:compile
[INFO] +- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:3.3.7:compile
[INFO] |  +- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:compile
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  +- org.apache.cxf:cxf-rt-transports-http:jar:3.3.7:compile
[INFO] |  \- org.apache.cxf:cxf-rt-security:jar:3.3.7:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.30:compile
[INFO] |  \- log4j:log4j:jar:1.2.17:compile
[INFO] +- org.apache.activemq:activemq-camel:jar:5.15.12:compile
[INFO] |  +- org.apache.camel:camel-jms:jar:2.24.3:compile
[INFO] |  |  +- org.springframework:spring-jms:jar:5.2.6.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-tx:jar:5.2.6.RELEASE:compile
[INFO] |  |  +- com.sun.xml.bind:jaxb-core:jar:2.3.0:compile
[INFO] |  |  \- com.sun.xml.bind:jaxb-impl:jar:2.3.0:compile
[INFO] |  +- org.apache.activemq:activemq-spring:jar:5.15.12:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO] |  |  \- org.apache.commons:commons-pool2:jar:2.8.0:compile
[INFO] |  \- org.apache.activemq:activemq-pool:jar:5.15.12:compile
[INFO] |     \- org.apache.activemq:activemq-jms-pool:jar:5.15.12:compile
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] |  \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- com.org.project:project-tools3:jar:1.0-SNAPSHOT:compile
[INFO] |  +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.junit:jar:4.10_1:compile
[INFO] |  |  \- org.hamcrest:hamcrest-core:jar:2.2:compile
[INFO] |  |     \- org.hamcrest:hamcrest:jar:2.2:compile
[INFO] |  +- org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:jar:1.1.3:compile
[INFO] |  +- org.apache.camel:camel-soap:jar:2.13.2:compile
[INFO] |  +- org.apache.camel:camel-mail:jar:2.13.2:compile
[INFO] |  |  \- javax.mail:mail:jar:1.4.7:compile
[INFO] |  +- org.apache.httpcomponents:httpcore-osgi:jar:4.3.2:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] |  |  \- org.apache.httpcomponents:httpcore-nio:jar:4.4.13:compile
[INFO] |  +- org.apache.httpcomponents:httpclient-osgi:jar:4.5.12:compile
[INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5.12:compile
[INFO] |  |  +- org.apache.httpcomponents:httpmime:jar:4.5.12:compile
[INFO] |  |  +- org.apache.httpcomponents:httpclient-cache:jar:4.5.12:compile
[INFO] |  |  \- org.apache.httpcomponents:fluent-hc:jar:4.5.12:compile
[INFO] |  +- commons-codec:commons-codec:jar:1.14:compile
[INFO] |  +- org.apache.cxf:cxf-rt-rs-security-cors:jar:3.2.0:compile
[INFO] |  +- org.jolokia:jolokia-osgi:jar:1.0.4:compile
[INFO] |  |  +- org.jolokia:jolokia-core:jar:1.6.2:compile
[INFO] |  |  \- org.jolokia:jolokia-jsr160:jar:1.0.4:compile
[INFO] |  +- org.apache.felix:org.apache.felix.metatype:jar:1.0.10:compile
[INFO] |  |  \- net.sf.kxml:kxml2:jar:2.2.2:compile
[INFO] |  |     \- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] |  +- org.apache.karaf.webconsole:org.apache.karaf.webconsole.branding:jar:2.3.8:compile
[INFO] |  |  \- org.apache.karaf.webconsole:org.apache.karaf.webconsole.console:jar:2.3.8:compile
[INFO] |  |     +- org.apache.geronimo.specs:geronimo-servlet_2.5_spec:jar:1.2:compile
[INFO] |  |     +- org.osgi:org.osgi.core:jar:4.3.1:compile
[INFO] |  |     \- org.osgi:org.osgi.compendium:jar:4.3.1:compile
[INFO] |  +- org.apache.karaf.webconsole:org.apache.karaf.webconsole.admin:jar:2.3.8:compile
[INFO] |  \- org.apache.felix:org.apache.felix.webconsole.plugins.event:jar:1.1.0:compile
[INFO] +- com.org.project:project-utilities:jar:1.0-SNAPSHOT:compile
[INFO] |  +- org.apache.cxf:cxf-bundle-compatible:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-common:jar:3.3.7:compile
[INFO] |  |  |  +- org.apache.velocity:velocity-engine-core:jar:2.2:compile
[INFO] |  |  |  |  \- org.apache.commons:commons-lang3:jar:3.10:compile
[INFO] |  |  |  \- org.glassfish.jaxb:jaxb-xjc:jar:2.3.3:compile
[INFO] |  |  |     +- org.glassfish.jaxb:xsom:jar:2.3.3:compile
[INFO] |  |  |     |  \- com.sun.xml.bind.external:relaxng-datatype:jar:2.3.3-b02:compile
[INFO] |  |  |     +- org.glassfish.jaxb:codemodel:jar:2.3.3:compile
[INFO] |  |  |     +- com.sun.xml.bind.external:rngom:jar:2.3.3:compile
[INFO] |  |  |     +- com.sun.xml.dtd-parser:dtd-parser:jar:1.4.3:compile
[INFO] |  |  |     \- com.sun.istack:istack-commons-tools:jar:3.0.11:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-validator:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-wsdlto-core:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-misctools:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-corba:jar:3.3.7:compile
[INFO] |  |  |  \- org.apache.cxf:cxf-rt-bindings-corba:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:jar:3.3.7:compile
[INFO] |  |  |  \- org.apache.commons:commons-text:jar:1.8:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-wadlto-jaxrs:jar:3.3.7:compile
[INFO] |  |  |  \- org.apache.cxf:cxf-rt-rs-service-description:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-wsdlto-frontend-javascript:jar:3.3.7:compile
[INFO] |  |  |  \- org.apache.cxf:cxf-rt-javascript:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-java2ws:jar:3.3.7:compile
[INFO] |  |  |  \- org.apache.cxf:cxf-rt-databinding-aegis:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-management:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-transports-local:jar:3.3.7:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-transports-http-jetty:jar:3.3.7:compile
[INFO] |  |  \- org.apache.cxf:cxf-rt-transports-jms:jar:3.3.7:compile
[INFO] |  +- org.apache.camel:camel-core:jar:2.13.2:compile
[INFO] |  +- mysql:mysql-connector-java:jar:8.0.20:compile
[INFO] |  +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-dbcp:jar:1.4_3:compile
[INFO] |  +- commons-pool:commons-pool:jar:1.6:compile
[INFO] |  \- org.codehaus.jettison:jettison:jar:1.3.5:compile
[INFO] |     \- stax:stax-api:jar:1.0.1:compile
[INFO] +- com.org.project:project-tools4:jar:1.0-SNAPSHOT:compile
[INFO] |  +- org.apache.activemq:activemq-client:jar:5.15.12:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile
[INFO] |  |  +- org.fusesource.hawtbuf:hawtbuf:jar:1.11:compile
[INFO] |  |  \- org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1:compile
[INFO] |  \- org.apache.activemq:activemq-broker:jar:5.15.12:compile
[INFO] |     +- org.apache.activemq:activemq-openwire-legacy:jar:5.15.12:compile
[INFO] |     \- com.google.guava:guava:jar:28.2-jre:compile
[INFO] |        +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |        +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |        +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |        +- org.checkerframework:checker-qual:jar:2.10.0:compile
[INFO] |        +- com.google.errorprone:error_prone_annotations:jar:2.3.4:compile
[INFO] |        \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] +- com.org.project:project-tools1:jar:1.0-SNAPSHOT:compile
[INFO] |  +- org.apache.poi:poi:jar:3.9:compile
[INFO] |  +- org.apache.poi:poi-ooxml:jar:3.9:compile
[INFO] |  |  +- org.apache.poi:poi-ooxml-schemas:jar:3.9:compile
[INFO] |  |  \- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  |     \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] |  \- com.org.project:project-tools8:jar:1.0-SNAPSHOT:compile
[INFO] +- com.org.project:project-tool9:jar:1.0-SNAPSHOT:compile
[INFO] |  +- org.apache.cxf:cxf-bundle:jar:2.7.11:compile
[INFO] |  |  +- org.apache.velocity:velocity:jar:1.7:compile
[INFO] |  |  +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] |  |  +- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] |  |  +- com.sun.xml.bind:jaxb-xjc:jar:2.1.13:compile
[INFO] |  |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  |  +- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-jaxws_2.2_spec:jar:1.1:compile
[INFO] |  |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.2.1:compile
[INFO] |  |  +- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-server:jar:9.4.28.v20200408:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-continuation:jar:9.4.28.v20200408:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.4.28.v20200408:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-io:jar:9.4.28.v20200408:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-util:jar:9.4.28.v20200408:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-security:jar:9.4.28.v20200408:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-servlet_3.0_spec:jar:1.0:compile
[INFO] |  |  +- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  |  +- org.springframework:spring-asm:jar:3.0.7.RELEASE:compile
[INFO] |  |  +- commons-lang:commons-lang:jar:2.6:compile
[INFO] |  |  +- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile
[INFO] |  |  +- org.apache.mina:mina-core:jar:2.0.7:compile
[INFO] |  |  +- asm:asm:jar:3.3.1:compile
[INFO] |  |  +- rhino:js:jar:1.7R2:compile
[INFO] |  |  +- javax.ws.rs:javax.ws.rs-api:jar:2.0-m10:compile
[INFO] |  |  +- net.oauth.core:oauth-provider:jar:20100527:compile
[INFO] |  |  +- net.oauth.core:oauth:jar:20100527:compile
[INFO] |  |  +- net.sf.ehcache:ehcache-core:jar:2.5.1:compile
[INFO] |  |  +- org.apache.ws.security:wss4j:jar:1.6.15:compile
[INFO] |  |  +- org.apache.santuario:xmlsec:jar:1.5.6:compile
[INFO] |  |  +- org.opensaml:opensaml:jar:2.6.1:compile
[INFO] |  |  +- org.opensaml:openws:jar:1.5.1:compile
[INFO] |  |  +- org.opensaml:xmltooling:jar:1.4.1:compile
[INFO] |  |  +- joda-time:joda-time:jar:2.2:compile
[INFO] |  |  +- xalan:serializer:jar:2.7.1:runtime
[INFO] |  |  +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] |  |  \- org.apache.neethi:neethi:jar:3.0.3:compile
[INFO] |  +- org.springframework:spring-beans:jar:5.2.6.RELEASE:compile
[INFO] |  +- org.apache.camel:camel-test:jar:2.13.2:compile
[INFO] |  +- org.apache.camel:camel-spring:jar:2.13.2:compile
[INFO] |  +- org.apache.camel:camel-cxf:jar:3.4.1:compile
[INFO] |  |  +- org.apache.camel:camel-support:jar:3.4.1:compile
[INFO] |  |  |  +- org.apache.camel:camel-api:jar:3.4.1:compile
[INFO] |  |  |  +- org.apache.camel:camel-management-api:jar:3.4.1:compile
[INFO] |  |  |  \- org.apache.camel:camel-util:jar:3.4.1:compile
[INFO] |  |  +- org.apache.camel:camel-attachments:jar:3.4.1:compile
[INFO] |  |  |  \- com.sun.activation:javax.activation:jar:1.2.0:compile
[INFO] |  |  +- org.apache.camel:camel-cxf-transport:jar:3.4.1:compile
[INFO] |  |  +- org.apache.camel:camel-http-base:jar:3.4.1:compile
[INFO] |  |  |  \- org.apache.camel:camel-core-catalog:jar:3.4.1:compile
[INFO] |  |  |     \- org.apache.camel:camel-tooling-model:jar:3.4.1:compile
[INFO] |  |  |        \- org.apache.camel:camel-util-json:jar:3.4.1:compile
[INFO] |  |  +- javax.servlet:javax.servlet-api:jar:4.0.1:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-rs-client:jar:3.3.6:compile
[INFO] |  |  \- org.apache.cxf:cxf-rt-features-logging:jar:3.3.6:compile
[INFO] |  \- org.apache.cxf.xjc-utils:cxf-xjc-runtime:jar:2.6.2:compile
[INFO] +- com.org.project:project-tool2:jar:1.0-SNAPSHOT:compile
[INFO] |  +- org.springframework:spring-context:jar:5.2.6.RELEASE:compile
[INFO] |  +- org.springframework:spring-test:jar:5.2.6.RELEASE:compile
[INFO] |  +- org.apache.camel:camel-jaxb:jar:2.13.2:compile
[INFO] |  +- org.apache.camel:camel-jdbc:jar:2.13.2:compile
[INFO] |  +- org.apache.camel:camel-sql:jar:2.13.2:compile
[INFO] |  |  \- org.springframework:spring-jdbc:jar:5.2.6.RELEASE:compile
[INFO] |  +- org.apache.camel:camel-test-spring:jar:2.13.2:compile
[INFO] |  +- org.springframework.amqp:spring-amqp:jar:2.2.6.RELEASE:compile
[INFO] |  |  \- org.springframework.retry:spring-retry:jar:1.2.5.RELEASE:compile
[INFO] |  +- org.springframework.amqp:spring-rabbit:jar:2.2.6.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-messaging:jar:5.2.6.RELEASE:compile
[INFO] |  +- com.rabbitmq:amqp-client:jar:5.9.0:compile
[INFO] |  +- org.apache.xbean:xbean-spring:jar:3.16:compile
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |  |  \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  \- com.org.project:project-tools7:jar:1.0-SNAPSHOT:compile
[INFO] \- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO]    \- junit:junit:jar:4.13:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.667 s
[INFO] Finished at: 2020-07-22T15:10:20+05:30
[INFO] ------------------------------------------------------------------------

答案1

得分: 0

这个错误是由于使用了不同的cxf jar版本导致的。
通过在当前项目和所有被导入的项目的pom.xml中匹配所有的cxf版本来解决了这个问题。

<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http</artifactId>
    <version>3.2.0</version>
</dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-spring</artifactId>
    <version>3.0.0-M1</version>
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-bundle-compatible</artifactId>
    <version>3.3.7</version>
</dependency>
英文:

This error was due to different cxf jar versions being used
This was solved by matching all the cxf versions in the pom.xml. of current project and all the projects being imported.

     &lt;dependency&gt;
&lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
&lt;artifactId&gt;cxf-rt-transports-http&lt;/artifactId&gt;
&lt;version&gt;3.2.0&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
&lt;artifactId&gt;camel-spring&lt;/artifactId&gt;
&lt;version&gt;3.0.0-M1&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
&lt;artifactId&gt;cxf-bundle-compatible&lt;/artifactId&gt;
&lt;version&gt;3.3.7&lt;/version&gt;
&lt;/dependency&gt;

huangapple
  • 本文由 发表于 2020年7月22日 18:05:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/63031737.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定