Request retry has failed due to NoSuchMethodError when trying to use any method
See original GitHub issueHi Thanks for your sdk! I am trying to make a simple call like this:
ShopifySdk shopifySdk = ShopifySdk.newBuilder() .withSubdomain("******") .withAccessToken("***********************************") .build();
final int shopifyCount = shopifySdk.getProductCount();
but i am getting a ShopifyClientException with message: “Request retry has failed” with a full stacktrace:
com.shopify.exceptions.ShopifyClientException: Request retry has failed. at com.shopify.ShopifySdk.invokeResponseCallable(ShopifySdk.java:859) at com.shopify.ShopifySdk.get(ShopifySdk.java:806) at com.shopify.ShopifySdk.getShop(ShopifySdk.java:442) at com.shopify.ShopifySdk.getWebTarget(ShopifySdk.java:930) at com.shopify.ShopifySdk.getProductCount(ShopifySdk.java:436) at com.mypackage.etc Caused by: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: javax.ws.rs.core.MultivaluedMap.addAll(Ljava/lang/Object;[Ljava/lang/Object;)V at com.github.rholder.retry.Retryer$ExceptionAttempt.<init>(Retryer.java:254) at com.github.rholder.retry.Retryer.call(Retryer.java:163) at com.shopify.ShopifySdk.invokeResponseCallable(ShopifySdk.java:857) ... 6 more Caused by: java.lang.NoSuchMethodError: javax.ws.rs.core.MultivaluedMap.addAll(Ljava/lang/Object;[Ljava/lang/Object;)V at org.glassfish.jersey.client.ClientRequest.accept(ClientRequest.java:336) at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:221) at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:59) at com.shopify.ShopifySdk.lambda$get$4(ShopifySdk.java:804) at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78) at com.github.rholder.retry.Retryer.call(Retryer.java:160)
I also tried other methods like getShop() etc but they give the same error, i also tried to modify retry limits delays etc but no luck. I also verified that my token is right. Any thoughts? Thanks in advance
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Thanks again for your response, the issue was indeed the versions of jersey and despite my effort to fix it without updating, i concluded that its ‘impossible’ (and if finally done, then its risky due to different implementations for many methods between the versions). We proceeded with updating to glassfish and playing around with your sdk, so consider the issue solved 😃 . In order not to open another issue i have a non related - but fast question : i noted that despite the fact that i create a product with withAvailable(randomStockValue) the product always appear as Sold Out, but when i then use updateInventory then it updates the quantity correctly. Does this have to do with Shopify’s flow (or some deprecation made from Shopify’s side) or am i just doing something wrong ?
np @ChrisMpitzios . As far as updating inventory levels go, yes shopify started to deprecate the inventory quantities on the variant’s themselves in favor of inventory levels, so that they can achieve inventory levels across locations. The available quantity on those newer variants are just a roll up of quantities at all locations and is not a writable field anymore.
Details on that here. https://help.shopify.com/en/api/guides/inventory-migration-guide
I’m going to close this specific issue out. If you have any more questions regarding inventory, feel free to open another issue.