Upgrade jersey from 2.3 to 3.04

735 Views Asked by At

I am upgrading jersey-bom to 3.0.4 from 2.35. I didn't change all namespaces to jakarta. from javax. as its only breaking after 3.1.x as per https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest3x/migration.html#mig-3.0.0-breaking-changes

I am getting the following errors -

java.lang.LinkageError: ClassCastException: attempting to castjar:file:/C:/Users/guptraka/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar!/javax/ws/rs/client/ClientBuilder.class to jar:file:/C:/Users/guptraka/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar!/javax/ws/rs/client/ClientBuilder.class
    at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:97)
    at javax.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:114)
    at com.**.rpc.jersey.InvokerClient.<init>(InvokerClient.java:145)
    at com.**.rpc.jersey.InvokerClient.createProxy(InvokerClient.java:72)
    at com.**.service.util.InvokerClientFactory.createProxy(InvokerClientFactory.java:39)
    at com.**.service.util.InvokerClientFactoryTest.shouldCreateProxy(InvokerClientFactoryTest.java:34)

0

There are 0 best solutions below