soda-java icon indicating copy to clipboard operation
soda-java copied to clipboard

java.lang.NoSuchMethodError when using Soda2Consumer.newConsumer method

Open nandini92 opened this issue 2 years ago • 0 comments

I'm trying out the example code provided in the Readme and unfortunately I'm receiving the following error during compilation:

Exception in thread "main" java.lang.NoSuchMethodError: 'org.glassfish.jersey.client.JerseyClientBuilder org.glassfish.jersey.client.JerseyClientBuilder.withConfig(javax.ws.rs.core.Configuration)'
        at com.socrata.api.HttpLowLevel.createClient(HttpLowLevel.java:160)
        at com.socrata.api.HttpLowLevel.createClient(HttpLowLevel.java:125)
        at com.socrata.api.HttpLowLevel.instantiate(HttpLowLevel.java:171)
        at com.socrata.api.Soda2Consumer.newConsumer(Soda2Consumer.java:30)
        ...

I can see that ClientConfig within JerseyClientBuilder uses jakarta.ws.rs.core.Configurationand and not javax.ws.rs.core.Configuration (although I do see javax.ws.rs.core.Configuration within my dependencies as well). I am unable to determine what is causing this error.

nandini92 avatar Sep 08 '23 21:09 nandini92