apache - Errors resulting from upgrading my CXF version from 2.7.7 to 3.1.8 -
pom.xml
<cxf.core>3.1.8</cxf.core> <cxf.version>3.1.8</cxf.version> <jsr311.api.version>1.1.1</jsr311.api.version> <javax.ws.rs.api.version>2.0.1</javax.ws.rs.api.version> <dependency> <groupid>com.sun.xml.bind</groupid> <artifactid>jaxb-api</artifactid> <version>2.1.14</version> </dependency> <dependency> <groupid>com.sun.xml.bind</groupid> <artifactid>jaxb-impl</artifactid> <version>2.1.14</version> </dependency> <dependency> <groupid>com.sun.xml.bind</groupid> <artifactid>jaxb-core</artifactid> <version>2.1.14</version> </dependency> <dependency> <groupid>javax.ws.rs</groupid> <artifactid>javax.ws.rs-api</artifactid> <version>${javax.ws.rs.api.version}</version> </dependency> <dependency> <groupid>javax.ws.rs</groupid> <artifactid>jsr311-api</artifactid> <version>${jsr311.api.version}</version> </dependency> <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-core</artifactid> <version>${cxf.core}</version> </dependency> <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-rt-frontend-jaxrs</artifactid> <version>${cxf.version}</version> <exclusions> <exclusion> <artifactid>cxf-common-utilities</artifactid> <groupid>org.apache.cxf</groupid> </exclusion> </exclusions> </dependency> <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-rt-frontend-jaxws</artifactid> <version>${cxf.version}</version> <exclusions> <exclusion> <artifactid>cxf-common-utilities</artifactid> <groupid>org.apache.cxf</groupid> </exclusion> </exclusions> </dependency>
exception :
warn:2017-07-27 17:19:37.903:localhost-startstop-1:"exception encountered during context initialization - cancelling refresh attempt":org.springframework.beans.factory.beancreationexception:error creating bean name 'caserviceclient' defined in url [jar:file:/users/vn0kt7d/documents/workspace-checkout1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/checkoutservice/web-inf/lib/checkout-adapter-1.0.0.75-snapshot.jar!/environmentconfig/default/customer-account-client.xml]: initialization of bean failed; nested exception java.lang.noclassdeffounderror: org/apache/cxf/jaxrs/client/jaxrsclientfactorybean:org.springframework.beans.factory.beancreationexception: error creating bean name 'caserviceclient' defined in url [jar:file:/users/vn0kt7d/documents/workspace-checkout1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/checkoutservice/web-inf/lib/checkout-adapter-1.0.0.75-snapshot.jar!/environmentconfig/default/customer-account-client.xml]: initialization of bean failed; nested exception java.lang.noclassdeffounderror: org/apache/cxf/jaxrs/client/jaxrsclientfactorybean @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:547) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:476) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:303) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:230) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:299) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:194) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.preinstantiatesingletons(defaultlistablebeanfactory.java:755) @ org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:757) @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:480) @ com.walmart.platform.scm.client.execution.scmservletcontextlistener.configureandrefreshwebapplicationcontext(scmservletcontextlistener.java:87) @ org.springframework.web.context.contextloader.initwebapplicationcontext(contextloader.java:306) @ org.springframework.web.context.contextloaderlistener.contextinitialized(contextloaderlistener.java:106) @ org.apache.catalina.core.standardcontext.listenerstart(standardcontext.java:5118) @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5634) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:145) @ org.apache.catalina.core.containerbase$startchild.call(containerbase.java:1571) @ org.apache.catalina.core.containerbase$startchild.call(containerbase.java:1561) @ java.util.concurrent.futuretask.run(futuretask.java:266) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) @ java.lang.thread.run(thread.java:748) caused java.lang.noclassdeffounderror: org/apache/cxf/jaxrs/client/jaxrsclientfactorybean @ com.walmart.platform.soa.client.abstractjaxrsclient.getjaxrsbean(abstractjaxrsclient.java:360) @ com.walmart.platform.soa.client.abstractjaxrsclient.getproxy(abstractjaxrsclient.java:275) @ com.walmart.platform.soa.client.annotation.soaclientannotationprocessor.wirejaxrsclient(soaclientannotationprocessor.java:464) @ com.walmart.platform.soa.client.annotation.soaclientannotationprocessor.wiresoaclient(soaclientannotationprocessor.java:89) @ com.walmart.platform.soa.client.annotation.soaclientannotationprocessor.access$000(soaclientannotationprocessor.java:42) @ com.walmart.platform.soa.client.annotation.soaclientannotationprocessor$1.dowith(soaclientannotationprocessor.java:65) @ org.springframework.util.reflectionutils.dowithfields(reflectionutils.java:605) @ org.springframework.util.reflectionutils.dowithfields(reflectionutils.java:585) @ com.walmart.platform.soa.client.annotation.soaclientannotationprocessor.postprocessafterinstantiation(soaclientannotationprocessor.java:58) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1172) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:537) ... 20 more caused java.lang.classnotfoundexception: org.apache.cxf.jaxrs.client.jaxrsclientfactorybean @ org.apache.catalina.loader.webappclassloaderbase.loadclass(webappclassloaderbase.java:1892) @ org.apache.catalina.loader.webappclassloaderbase.loadclass(webappclassloaderbase.java:1735) ... 31 more
fyi, have added jaxb-impl dependency explicitly because:
org.springframework.beans.factory.beancreationexception: error creating bean name 'example': invocation of init method failed; nested exception java.lang.nosuchfielderror: reflection
what root cause issue?
you should add cxf-rt-rs-client
dependency.
moreover drop jsr311 api , use 2.0 1 instead.
Comments
Post a Comment