channelape / shopify-sdk Goto Github PK
View Code? Open in Web Editor NEWJava SDK for Shopify REST APIs
License: Apache License 2.0
Java SDK for Shopify REST APIs
License: Apache License 2.0
Hi,
Thanks for nice shopify sdk, i need to create product with images in one api call .. is that possible?
https://shopify.dev/docs/admin-api/rest/reference/products/product
because i can see here the sample, but our code do create product seperatly and updateproductimages seperatly.. is there anyway to do in single step.. i mean can we include in create product post api call itself.
Thanks
Chandran
Is there any documentation or API reference for this SDK?
Browsing through source codes takes much time.
Much appreciated!
https://help.shopify.com/en/api/guides/paginated-rest-results#supported-endpoints
The July 2019 Shopify API release deprecated pagination via page numbers in favor of pagination by using links that are proved in the response header:
https://help.shopify.com/en/api/reference/products/product#index-2019-07
Currently the shopify-sdk will log an ERROR
level message when making getProducts calls indicating the deprecated header.
Looks like we have been moved back to X-Shopify-API-Version=[2019-04]
for these requests (we are not currently specifying a version in our API requests).
Therefore since this is the only deprecated call we are currently making, according to the API version releases schedule we have until 2020-04 to upgrade our services with the new product pagination.
https://help.shopify.com/en/api/versioning
Each stable version is supported for a minimum of 12 months. This means that there are at least 9 months of overlap between two consecutive stable versions. When a new stable version is introduced and contains changes that affect your app, you have 9 months to test and migrate your app to the new version before support for the previous version is removed.
We create two store for diffrent language, if i must to get two store products info through two admin token and subdomain?
Facing the below error. Can somebody provide an example for the usage of the the SDK?
I've initialized it as below.
ShopifySdk shopifySdk = ShopifySdk.newBuilder()
.withSubdomain("mystore.myshopify.com")
.withAccessToken("mytoken_xxxxx").build();
ShopifyShop shopifyShop = shopifySdk.getShop();
Is it correct?
Facing the below issue - An exception occurred while making an API call to shopify: 12 on attempt number 33 and {} seconds since first attempt
java.lang.IllegalStateException: InjectionManagerFactory not found.
at org.glassfish.jersey.internal.inject.Injections.lambda$lookupInjectionManagerFactory$0(Injections.java:74) ~[jersey-common-2.32.jar:na]
at java.util.Optional.orElseThrow(Optional.java:290) ~[na:1.8.0_152]
at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:74) ~[jersey-common-2.32.jar:na]
at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:44) ~[jersey-common-2.32.jar:na]
at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:412) ~[jersey-client-2.32.jar:na]
at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:317) ~[jersey-common-2.32.jar:na]
at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:814) ~[jersey-client-2.32.jar:na]
at org.glassfish.jersey.client.ClientRequest.getClientRuntime(ClientRequest.java:219) ~[jersey-client-2.32.jar:na]
at org.glassfish.jersey.client.ClientRequest.getInjectionManager(ClientRequest.java:610) ~[jersey-client-2.32.jar:na]
at org.glassfish.jersey.client.JerseyWebTarget.onBuilder(JerseyWebTarget.java:364) ~[jersey-client-2.32.jar:na]
at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:199) ~[jersey-client-2.32.jar:na]
at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:36) ~[jersey-client-2.32.jar:na]
at com.shopify.ShopifySdk.lambda$get$4(ShopifySdk.java:939) [shopify-sdk-2.3.0.jar:na]
at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78) ~[guava-retrying-2.0.0.jar:na]
at com.github.rholder.retry.Retryer.call(Retryer.java:160) ~[guava-retrying-2.0.0.jar:na]
at com.shopify.ShopifySdk.invokeResponseCallable(ShopifySdk.java:992) [shopify-sdk-2.3.0.jar:na]
at com.shopify.ShopifySdk.get(ShopifySdk.java:941) [shopify-sdk-2.3.0.jar:na]
at com.shopify.ShopifySdk.getShop(ShopifySdk.java:523) [shopify-sdk-2.3.0.jar:na]
at com.shopify.ShopifySdk.getWebTarget(ShopifySdk.java:1077) [shopify-sdk-2.3.0.jar:na]
at com.shopify.ShopifySdk.getShop(ShopifySdk.java:523) [shopify-sdk-2.3.0.jar:na]
I am able to create a product with SDK, but couldn't find a way to set custom collection of a product during creation request or for an already created Shopify product. Looks like the Shopify Collect API is not implemented.
Any help would be appreciated.
I use ShopifySdk. getProducts(); After obtaining the product, there is no corresponding product URL in it
packaged as jar
java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider org.glassfish.jersey.internal.RuntimeDelegateImpl could not be instantiated: java.lang.IllegalStateException: No generator was provided and there is no default generator registered at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:152
)
at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:95)
at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:119)
at org.glassfish.jersey.client.JerseyWebTarget.<init>(JerseyWebTarget.ja
va:71)
at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:290
)
at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:76)
at shopify.ShopifySdk.getWebTarget(ShopifySdk.java:1017)
at shopify.ShopifySdk.getShop(ShopifySdk.java:455)
at com.chaosxing.pos.sdk.shopify.ShopifySDK.verify(ShopifySDK.java:53)
at com.chaosxing.pos.service.RestService$TestHandler.handle(RestService.
java:106)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.
java:675)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: Provider org.glassfish.jersey.inter
nal.RuntimeDelegateImpl could not be instantiated: java.lang.IllegalStateExcepti
on: No generator was provided and there is no default generator registered
at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:122)
at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225)
at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135
)
... 19 more
Caused by: java.lang.IllegalStateException: No generator was provided and there
is no default generator registered
at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.internalCreate(S
erviceLocatorFactoryImpl.java:308)
at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.create(ServiceLo
catorFactoryImpl.java:293)
at org.glassfish.jersey.internal.inject.Injections._createLocator(Inject
ions.java:138)
at org.glassfish.jersey.internal.inject.Injections.createLocator(Injecti
ons.java:109)
at org.glassfish.jersey.internal.RuntimeDelegateImpl.(RuntimeDeleg
ateImpl.java:63)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:118)
... 21 more
As mentioned, Shopify has updated its API for order fulfillment. I also saw a related branch with updates, but I can't find it now.
Shopify is updating the way they paginate through items in the 2019-10 api release. It looks like we will need to update the way we paginate through things when using API's from this version and above.
At this moment it's still only a release canidate so there is time before we are forced to update this:
https://help.shopify.com/en/api/guides/paginated-rest-results
Hey Guys,
thank you for your API. It is a huge help.
I got this issue:
Wen I'am creating new Products with variants, I am giving them the image Sources. The ShopifySdk class function setVariantImageIds determines the correct image of the variant and tires to update:
But the imageID is not updated correctly during the put request:
This looks like a bug to me. Can somebody help?
Best Regards
Timo
Build times are taking 20+ minutes in travis and even timing out with larger changes. This is due to the number of mutations and the mock rest service we are using. I think a change to the mock rest server that responds immediately instead of waiting for an unknown requests can significantly speed the mutation testing up.
When performing a GET
method and getting a bad access token error, the sdk is unable to construct the ShopifyErrorResponseException object:
JsonMappingException: Can not construct instance of com.shopify.model.ShopifyErrors: no String-argument constructor/factory method to deserialize from String value ('[API] Invalid API key or access token (unrecognized login or wrong password)')
at [Source: {"errors":"[API] Invalid API key or access token (unrecognized login or wrong password)"}; line: 1, column: 11] (through reference chain: com.shopify.model.ShopifyErrorsRoot["errors"])
shopify-sdk relies on JAXB APIs that were part of the JDK in Java 8 but lost support in later versions. We should ensure that the shopify-sdk works with Java 8, 9, 10, and 11
Hopefully we can accomplish this by just including the Maven Dependencies for JAXB that are now excluded.
We should start running CI builds with different JDK versions to ensure we maintain support.
I am creating Shopify product using below request,
variant creation request,
`ShopifyVariantCreationRequest variantCreationRequest = ShopifyVariantCreationRequest
.newBuilder()
.withPrice(new BigDecimal("100"))
.withCompareAtPrice(null)
.withSku("temCode")
.withBarcode("barCode")
.withWeight(new BigDecimal("0"))
.withAvailable(10)
.withFirstOption("option1")
.withSecondOption("option2")
.withThirdOption("option3)"
.withImageSource(null)
.withDefaultInventoryManagement()
.withDefaultInventoryPolicy()
.withDefaultFulfillmentService()
.withRequiresShipping(true)
.withTaxable(false)
.build()
List<ShopifyVariantCreationRequest> variantCreationRequests = new ArrayList<>()
variantCreationRequests.add(variantCreationRequest)`
product creation request,
` ShopifyProductCreationRequest productCreationRequest = ShopifyProductCreationRequest
.newBuilder()
.withTitle("Test")
.withMetafieldsGlobalTitleTag("Test")
.withProductType("Fruit")
.withBodyHtml("description")
.withMetafieldsGlobalDescriptionTag("description")
.withVendor("Shopify")
.withTags(null)
.withSortedOptionNames(new ArrayList<>())
.withImageSources(new ArrayList<>())
.withVariantCreationRequests(variantCreationRequests)
.withPublished(true)
.build()
ShopifyProduct shopifyProduct = shopifySdk.createProduct(productCreationRequest)`
The product gets created successfully but the inventory doesn't get updated. The product is always shown as 0 available in 1 variant. What could be the issue?
Hi!
I was hoping to support and use this github repository for shop integration - are we expecting that it'll upgrade to 2021 anytime soon?
when i run code below,my project report exception"java.net.UnknownHostException: https" :
ShopifySdk.newBuilder()
.withSubdomain("https://store-test.myshopify.com")
.withAccessToken(accessToken)
.withMaximumRequestRetryTimeout(5, TimeUnit.SECONDS)
.withMaximumRequestRetryRandomDelay(5, TimeUnit.SECONDS)
.build().createProduct(shopifyProductCreationRequest);
There is no documentation on how many products will get returned by the getProducts() method.
Does anybody have an idea?
java.lang.IllegalStateException: InjectionManagerFactory not found.
at org.glassfish.jersey.internal.inject.Injections.lambda$lookupInjectionManagerFactory$0(Injections.java:74) ~[jersey-common-2.35.jar:na]
at java.util.Optional.orElseThrow(Optional.java:290) ~[na:1.8.0_342]
at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:74) ~[jersey-common-2.35.jar:na]
at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:44) ~[jersey-common-2.35.jar:na]
at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:413) ~[jersey-client-2.35.jar:na]
at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:317) ~[jersey-common-2.35.jar:na]
at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:820) ~[jersey-client-2.35.jar:na]
at org.glassfish.jersey.client.ClientRequest.getClientRuntime(ClientRequest.java:176) ~[jersey-client-2.35.jar:na]
at org.glassfish.jersey.client.ClientRequest.getInjectionManager(ClientRequest.java:567) ~[jersey-client-2.35.jar:na]
at org.glassfish.jersey.client.JerseyWebTarget.onBuilder(JerseyWebTarget.java:371) ~[jersey-client-2.35.jar:na]
at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:206) ~[jersey-client-2.35.jar:na]
at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:38) ~[jersey-client-2.35.jar:na]
at com.shopify.ShopifySdk.lambda$get$4(ShopifySdk.java:1015) [shopify-sdk-2.8.0.jar:na]
at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78) ~[guava-retrying-2.0.0.jar:na]
at com.github.rholder.retry.Retryer.call(Retryer.java:160) ~[guava-retrying-2.0.0.jar:na]
at com.shopify.ShopifySdk.invokeResponseCallable(ShopifySdk.java:1068) [shopify-sdk-2.8.0.jar:na]
at com.shopify.ShopifySdk.get(ShopifySdk.java:1017) [shopify-sdk-2.8.0.jar:na]
at com.shopify.ShopifySdk.getShop(ShopifySdk.java:548) [shopify-sdk-2.8.0.jar:na]
at com.shopify.ShopifySdk.getWebTarget(ShopifySdk.java:1153) [shopify-sdk-2.8.0.jar:na]
at com.shopify.ShopifySdk.getProducts(ShopifySdk.java:475) [shopify-sdk-2.8.0.jar:na]
at com.shopify.ShopifySdk.getProducts(ShopifySdk.java:471) [shopify-sdk-2.8.0.jar:na]
at com.shopify.ShopifySdk.getProducts(ShopifySdk.java:484) [shopify-sdk-2.8.0.jar:na]
at com.yihemiao.tts.web.TestController.getProduct(TestController.java:43) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_342]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_342]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_342]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_342]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [spring-web-5.3.23.jar:5.3.23]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) [spring-web-5.3.23.jar:5.3.23]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) [spring-webmvc-5.3.23.jar:5.3.23]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) [spring-webmvc-5.3.23.jar:5.3.23]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) [spring-webmvc-5.3.23.jar:5.3.23]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) [spring-webmvc-5.3.23.jar:5.3.23]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071) [spring-webmvc-5.3.23.jar:5.3.23]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964) [spring-webmvc-5.3.23.jar:5.3.23]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [spring-webmvc-5.3.23.jar:5.3.23]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) [spring-webmvc-5.3.23.jar:5.3.23]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:670) [tomcat-embed-core-9.0.68.jar:4.0.FR]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [spring-webmvc-5.3.23.jar:5.3.23]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:779) [tomcat-embed-core-9.0.68.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-embed-websocket-9.0.68.jar:9.0.68]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.3.23.jar:5.3.23]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.23.jar:5.3.23]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) [spring-web-5.3.23.jar:5.3.23]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.23.jar:5.3.23]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.3.23.jar:5.3.23]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.23.jar:5.3.23]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-embed-core-9.0.68.jar:9.0.68]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.68.jar:9.0.68]
at java.lang.Thread.run(Thread.java:750) [na:1.8.0_342]
Currently, the Shopify sdk only supports the Rest Admin API. To better optimize things we should utilize the graphql API.
Create new methods and models that utilize the graphql Admin API.
Regardless of build times that we can control, such as the amount of testing and building that is done, Travis CI seems to take a long time to queue the actual build to be queued and started. At least an hour possibly more.
https://cdn.zappy.app/aae6f95003344563acdcee690cc49b29.png
Looks like it's related to travis CI builds being backed up which is out of our control:
https://www.traviscistatus.com/
Should we consider moving off of Travis to github actions? They are both free and should be able to handle the same thing. It would be better if we can these builds to be more reactive.
I noticed that the latest version of the SDK has support for updating customer information. It would be great to have methods called getCustomers()
and getCustomer(String id)
or something of that nature that fetch all customers and individual customer details based on an e-mail or an ID. It would also be nice to extend this support to the customer search endpoint in case you need to search for a customer based on some other attribute than ID.
Hello everyone, I added a library [Shopify SDK 2.4.3]
I tried to authenticate or make another request, and I got this. The problem can only be solved if you download the archive and remove some dependencies.
instead:
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.4.0</version>
</dependency>-->
put:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.0</version>
</dependency>
But this doesn't solve the problem 100% because I would need to manually include the @xmlelement(name = "name_with_underline") annotation
How to fix?
2022-03-25 18:56:16.439 INFO 29477 --- [ main] com.shopify.BackendApplication : Starting BackendApplication using Java 11.0.12 on optimus-OptiPlex-790 with PID 29477 (/home/optimus/projects/shopify-connector/target/classes started by root in /home/optimus/projects/shopify-connector)
2022-03-25 18:56:16.442 INFO 29477 --- [ main] com.shopify.BackendApplication : No active profile set, falling back to 1 default profile: "default"
2022-03-25 18:56:17.344 INFO 29477 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$a6f913ff] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-03-25 18:56:17.401 INFO 29477 --- [ main] .w.s.a.s.AnnotationActionEndpointMapping : Supporting [WS-Addressing August 2004, WS-Addressing 1.0]
2022-03-25 18:56:18.022 INFO 29477 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-03-25 18:56:18.047 INFO 29477 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-03-25 18:56:18.048 INFO 29477 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.58]
2022-03-25 18:56:18.174 INFO 29477 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-03-25 18:56:18.175 INFO 29477 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1645 ms
2022-03-25 18:56:18.214 ERROR 29477 --- [ main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'formContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedFormContentFilter]: Factory method 'formContentFilter' threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
2022-03-25 18:56:18.250 INFO 29477 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-03-25 18:56:18.262 WARN 29477 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2022-03-25 18:56:18.275 INFO 29477 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-03-25 18:56:18.301 ERROR 29477 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:163) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:577) ~[spring-context-5.3.16.jar:5.3.16]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-2.6.4.jar:2.6.4]
at com.shopify.BackendApplication.main(BackendApplication.java:9) ~[classes/:na]
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:142) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:104) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:478) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:211) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:182) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:160) ~[spring-boot-2.6.4.jar:2.6.4]
... 8 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'formContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedFormContentFilter]: Factory method 'formContentFilter' threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:212) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:175) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:170) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:155) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:87) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:260) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:234) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) ~[spring-boot-2.6.4.jar:2.6.4]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5219) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:486) ~[tomcat-embed-core-9.0.58.jar:9.0.58]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:123) ~[spring-boot-2.6.4.jar:2.6.4]
... 13 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedFormContentFilter]: Factory method 'formContentFilter' threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.16.jar:5.3.16]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.16.jar:5.3.16]
... 54 common frames omitted
Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
at org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter.(AllEncompassingFormHttpMessageConverter.java:91) ~[spring-web-5.3.16.jar:5.3.16]
at org.springframework.web.filter.FormContentFilter.(FormContentFilter.java:61) ~[spring-web-5.3.16.jar:5.3.16]
at org.springframework.boot.web.servlet.filter.OrderedFormContentFilter.(OrderedFormContentFilter.java:29) ~[spring-boot-2.6.4.jar:2.6.4]
at org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration.formContentFilter(WebMvcAutoConfiguration.java:179) ~[spring-boot-autoconfigure-2.6.4.jar:2.6.4]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.16.jar:5.3.16]
... 55 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[na:na]
... 64 common frames omitted
I want to get the local pickup status use the SDK, but I can't find the ShopifyOrder class 's method return that info.
Any help would be greatly appreciated.
Hi,
I'm using your sdk tool and was trying to automate the creation/update of product variants.
If I use the web interface of shopify I have the ability to create, for example, two options and I get all variants like in the first image.
In the second image you may see that all variants have been automatically created.
Is there a way in your sdk to send the options and have automagically all variants created?
Thanks a lot.
Kind regards,
Francesco
Use the fulfillmentOrder api to fulfill the order and get a response'The required line_items_by_fulfillment_order field is missing '
Hi,
Thanks for the great library!
I am struggling to see how I can add Variants without needing to add a Product as well as being able to delete them?
I am sure there is some way in the SDK that will allow this, I am just unsure of it at the moment.
Any help would be gladly appreciated!
When the call to response to shopifySdk.getShop()
is fired off, it errors out throwing this:
javax.ws.rs.ProcessingException: Error reading entity from input stream.
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:900) ~[jersey-common-2.35.jar:na]
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:819) ~[jersey-common-2.35.jar:na]
at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:298) ~[jersey-client-2.35.jar:na]
at org.glassfish.jersey.client.InboundJaxrsResponse$1.call(InboundJaxrsResponse.java:93) ~[jersey-client-2.35.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:292) ~[jersey-common-2.35.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:274) ~[jersey-common-2.35.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:205) ~[jersey-common-2.35.jar:na]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:365) ~[jersey-common-2.35.jar:na]
at org.glassfish.jersey.client.InboundJaxrsResponse.runInScopeIfPossible(InboundJaxrsResponse.java:244) ~[jersey-client-2.35.jar:na]
at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:90) ~[jersey-client-2.35.jar:na]
at com.shopify.ShopifySdk.getShop(ShopifySdk.java:524) ~[shopify-sdk-2.5.0.jar:na]
at com.shopify.ShopifySdk.getWebTarget(ShopifySdk.java:1077) ~[shopify-sdk-2.5.0.jar:na]
at com.shopify.ShopifySdk.getShop(ShopifySdk.java:523) ~[shopify-sdk-2.5.0.jar:na]
at com.zev.installations.controllers.Private.core.StoresController.save(StoresController.java:162) ~[classes/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-5.3.18.jar:5.3.18]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) ~[spring-web-5.3.18.jar:5.3.18]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-5.3.18.jar:5.3.18]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.18.jar:5.3.18]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.18.jar:5.3.18]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.18.jar:5.3.18]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067) ~[spring-webmvc-5.3.18.jar:5.3.18]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.18.jar:5.3.18]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.18.jar:5.3.18]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.18.jar:5.3.18]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) ~[servlet-api.jar:na]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.18.jar:5.3.18]
What causes this? How do I fix it?
Thanks
This may be a pedantic nitpicky thing, but it doesn't seem right to publish the SDK using the com.shopify
package. It implies an official endorsement where none exists. Perhaps this should be changed to com.channelape.shopify
?
Hi
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
There is no way of creating a product with DRAFT status. All products are created as ACTIVE
Hi! Is there any way to update an existing order? Specifically I would like to add a metafield to an existing order.
I can only see a method to update the shipping address of the order (through shopifySdk.updateOrderShippingAddress) but how can I update other than the shipping address?
Hi ChannelApe,
Is there any documentation for this SDK?. and one more thing this SDK is only for the API call or it covers the Outh flow to get the offline/online access token.?
Description of Changes
There are dependency versions when using the SDK with spring boot version 2 surround the marshaler. See #32 . This should be updated to support newer versions of those dependencies so that it can be used with the spring boot 2.
Possible Drawbacks
This is going to be a very large change with much regression testing since the way shopify handles empty values vs values not provided for fields is different. This might be a good thing to handle when we start adding support for graphql API's.
Hi all,
Sorry to open another issue so soon, but I also noticed while working on #17 that only a limited number of fields were supported in the call to updateCustomer
. It would be nice to optionally pass a ShopifyCustomer
object while constructing the request. I currently have a solution in progress, happy to open up that PR soon.
Missing weight field In com.shopify.model.ShopifyVariant.java
If different fulfillment orders belonging to an order have different delivery_method, you will get an error when creating a fulfillment: {"errors": ["All fulfillment orders must have the same delivery method type. Multiple delivery method types [" none\ "," shipping\ "] were found."]}
This should add functionality to update the customer information in shopify:
https://help.shopify.com/en/api/reference/customers/customer#update
We do not allow specification of an API version within this SDK right now. This makes it tough when Shopify introduces breaking changes that someone might want to wait to adopt. We should add an optional step to our Shopify SDK Builder that takes in an API version.
Shopify has separate non-oauth authentication for private apps for individual shops. This uses HTTP Basic authentication. The SDK doesn't appear to support this currently.
I'd like to be able to update (and create?) custom collections and smart collections via the REST API.
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "email" (class com.shopify.model.Shop), not marked as ignorable (2 known properties: "id", "name"])
at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: com.shopify.model.ShopifyShop["shop"]->com.shopify.model.Shop["email"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:840) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1206) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1592) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1570) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:294) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1682) ~[jackson-databind-2.10.2.jar:2.10.2]
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:977) ~[jackson-databind-2.10.2.jar:2.10.2]
at org.glassfish.jersey.jackson.internal.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:838) ~[jersey-media-json-jackson-2.29.1.jar:na]
at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:233) ~[jersey-common-2.29.1.jar:na]
at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:212) ~[jersey-common-2.29.1.jar:na]
at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:132) ~[jersey-common-2.29.1.jar:na]
at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1071) ~[jersey-common-2.29.1.jar:na]
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:850) ~[jersey-common-2.29.1.jar:na]
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:784) ~[jersey-common-2.29.1.jar:na]
at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:297) ~[jersey-client-2.29.1.jar:na]
at org.glassfish.jersey.client.InboundJaxrsResponse$1.call(InboundJaxrsResponse.java:91) ~[jersey-client-2.29.1.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:292) ~[jersey-common-2.29.1.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:274) ~[jersey-common-2.29.1.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:205) ~[jersey-common-2.29.1.jar:na]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:365) ~[jersey-common-2.29.1.jar:na]
at org.glassfish.jersey.client.InboundJaxrsResponse.runInScopeIfPossible(InboundJaxrsResponse.java:240) ~[jersey-client-2.29.1.jar:na]
at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:88) ~[jersey-client-2.29.1.jar:na]
at com.shopify.ShopifySdk.getShop(ShopifySdk.java:456) ~[shopify-sdk-1.6.0.jar:na]
at com.shopify.ShopifySdk.getWebTarget(ShopifySdk.java:999) ~[shopify-sdk-1.6.0.jar:na]
at com.shopify.ShopifySdk.getProducts(ShopifySdk.java:427) ~[shopify-sdk-1.6.0.jar:na]
at com.shopify.ShopifySdk.getProducts(ShopifySdk.java:439) ~[shopify-sdk-1.6.0.jar:na]
at shopify_test.demo.service.impl.ShopifyProductRpcServiceImpl.publish(ShopifyProductRpcServiceImpl.java:31) ~[classes/:na]
at shopify_test.demo.controller.StoreController.productPublish(StoreController.java:26) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_152]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_152]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_152]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_152]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.30.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) [tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860) [tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598) [tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.30.jar:9.0.30]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_152]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.30.jar:9.0.30]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
where can i find a documentation for this sdk ?
ShopifyProduct has no status field ,I want to get product status about whether active or draft
There are many reports that can be downloaded in the background of Shopify. How can I download background reports through API, or does this SDK support background report downloading?
Problem:
There is something happening around reading the buffered response that is eating the response causing an error message like the following:
com.shopify.exceptions.ShopifyErrorResponseException: Received unexpected Response Status Code of 422
9/2/2020 1:15:40 PMResponse Headers of:
Expected Behavior
Log the error response so that the error messages are easier to debug. Without this, it's a guessing game on why the error response was returned.
Shopify SDK currently does not send a Shopify Version to the Shopify REST API when one is not specified during build of ShpoifySDK. You can pass in a Shopify API version using the withApiVersion
parameter as of Release 2.3.0.
We have learned from Shopify that they strongly recommend setting a version for each Shopify REST API request or else we unexpected behavior may occur. We should force API Version selection when building the Shopify-SDK. This would be a breaking change.
https://shopify.dev/concepts/about-apis/versioning
It's recommended that you specify what version of the API you want your app to make calls to as our system defaulting to the correct version shouldn't be relied upon. It's best practice to point your app exactly where you want it to go, so it behaves as expected for the specified time frame. Anything outside of that is not guaranteed to work! Additionally, there's a forum post here with one of our developers that should break this down even further for you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.