Previously we are using Jersey 1.17 and org.apache.cxf 2.6.0 version for different components of our project . Now our proj migrated to Jersey 1.19.4 and cxf 3.2.6 . I saw jersey 1.19.4 holding javax.ws.rs:jsr311-api:jar:1.1.1 where as cxf 3.2.6 holding javax.ws.rs:javax.ws.rs-api:jar:2.1 . All components are compiling successfully without any failure . But in Application We are facing this below issue :-
Oct 17, 2018 10:29:08 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [CA Service REST API] in context with path [/caservice] threw exception [Servlet execution threw an exception] with root cause java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder; at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:120) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:669) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF)
How We resolve this issue ?
After upgrading this is my dependency tree Structure
+- org.apache.cxf:cxf-core:jar:3.2.6:compile
[INFO] | | +- com.fasterxml.woodstox:woodstox-core:jar:5.1.0:compile
[INFO] | | | \- org.codehaus.woodstox:stax2-api:jar:4.1:compile
[INFO] | | \- org.apache.ws.xmlschema:xmlschema-core:jar:2.2.3:compile
[INFO] | +- org.apache.cxf:cxf-rt-rs-client:jar:3.2.6:compile
[INFO] | | \- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:3.2.6:compile
[INFO] | | +- javax.ws.rs:javax.ws.rs-api:jar:2.1:compile
[INFO] | | \- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | +- org.apache.cxf:cxf-rt-transports-http:jar:3.2.6:compile
+- com.sun.jersey:jersey-core:jar:1.19.4:compile
[INFO] | \- javax.ws.rs:jsr311-api:jar:1.1.1:compile