io.sphere.sdk.meta.TroubleshootingGuide Maven / Gradle / Ivy
package io.sphere.sdk.meta;
/**
Mixed dependencies
Indications
{@code java.lang.NoClassDefFoundError: }
Possible solutions
The JVM SDK depends on multiple modules like the Java client and the models, make sure that they have the same version number in your build file.
Example for wrong pom:
{@code
io.sphere.sdk.jvm
sphere-models
1.0.0-M16
io.sphere.sdk.jvm
sphere-java-client
1.0.0-M15
}
Example for fixed pom:
{@code
io.sphere.sdk.jvm
sphere-models
1.0.0-M16
io.sphere.sdk.jvm
sphere-java-client
1.0.0-M16
}
JSON Jackson Initialization Problems
Indications
{@code Could not initialize class }
Possible solutions
It could be the case that you use a build tool like Maven which has other code in it depending on an older Jackson version.
The Maven way of getting transitive dependencies may cause that you
use an outdated Jackson version and you need to explicitly pull it up like with:
{@code
com.fasterxml.jackson.core
jackson-annotations
2.6.0
com.fasterxml.jackson.core
jackson-core
2.6.0
com.fasterxml.jackson.core
jackson-databind
2.6.0
com.fasterxml.jackson.module
jackson-module-parameter-names
2.6.0
com.fasterxml.jackson.datatype
jackson-datatype-jsr310
2.6.0
}
Incompatible Ning Async Http Client Versions
Indications
{@code java.lang.NoSuchMethodError: com.ning.http.client.}
Possible solutions
Switch to another adapter for this library, remove "sphere-java-client" and replace it with "sphere-java-client-ahc-1_8", refer to the README.md in the SDK GitHub repo.
A list of breaking changes from Ning Async HTTP Client 1.8 to 1.9.
Ning Async Http Client is flooding the logs
See {@link io.sphere.sdk.utils.SphereInternalLogger}.
How to provide a reproduceable support question
If you get an exception, give us the stacktrace with data you want to share.
A typical exception stack trace looks like this:
{@code
[error] project: sphere-project-key-42
[error] endpoint: POST /tax-categories/b5a012ae-0824-4935-b935-943e4253b5c7
[error] Java: 1.8.0_45
[error] cwd: /Users/myname/dev/projectname
[error] date: Fri Aug 14 13:36:46 CEST 2015
[error] sphere request: DeprecationExceptionSphereClientDecorator.DeprecationHeaderSphereRequest[sphereRequest=TaxCategoryUpdateCommandImpl[versioned=TaxCategoryImpl[name=random-slug--1248264105,description=,taxRates=[TaxRateImpl[id=DkZrWYZZ,name=de19,amount=0.19,includedInPrice=true,country=DE,state=]],id=b5a012ae-0824-4935-b935-943e4253b5c7,version=1,createdAt=2015-08-14T11:36:45.833Z,lastModifiedAt=2015-08-14T11:36:45.833Z],updateActions=[AddTaxRate[taxRate=TaxRateImpl[id=,name=de7,amount=0.07,includedInPrice=true,country=DE,state=],action=addTaxRate]],typeReference=TypeReference,baseEndpointWithoutId=/tax-categories,creationFunction=io.sphere.sdk.taxcategories.commands.TaxCategoryUpdateCommandImpl$$Lambda$125/335238144@477de51b,expansionModel=TaxCategoryExpansionModel[parentPath=,path=],expansionPaths=[]]]
[error] http request: HttpRequestIntent[httpMethod=POST,path=/tax-categories/b5a012ae-0824-4935-b935-943e4253b5c7,headers={},body=StringHttpRequestBody[body={"version":1,"actions":[{"action":"addTaxRate","taxRate":{"id":null,"name":"de7","amount":0.07,"includedInPrice":true,"country":"DE","state":null}}]}]]
[error] http response: HttpResponseImpl[statusCode=400,headers={Transfer-Encoding=[chunked], Server=[nginx], Access-Control-Allow-Origin=[*], X-Served-By=[app08.sphere.prod.commercetools.de], X-Correlation-ID=[nginx-cfd1585f-971e-4b43-9fce-b72bba93d8e0], Access-Control-Allow-Methods=[GET, POST, DELETE, OPTIONS], Connection=[close], X-Served-Config=[sphere-projects-ws-1.0], Date=[Fri, 14 Aug 2015 11:36:45 GMT], Access-Control-Allow-Headers=[Accept, Authorization, Content-Type, Origin], Content-Type=[application/json; charset=utf-8]},responseBody={123,34,115,116,97,116,117,115,67,111,100,101,34,58,52,48,48,44,34,109,101,115,115,97,103,101,34,58,34,68,117,112,108,105,99,97,116,101,32,116,97,120,32,114,97,116,101,32,102,111,114,32,68,69,46,34,44,34,101,114,114,111,114,115,34,58,91,123,34,99,111,100,101,34,58,34,73,110,118,97,108,105,100,79,112,101,114,97,116,105,111,110,34,44,34,109,101,115,115,97,103,101,34,58,34,68,117,112,108,105,99,97,116,101,32,116,97,120,32,114,97,116,101,32,102,111,114,32,68,69,46,34,125,93,125},associatedRequest=,bodyAsStringForDebugging={"statusCode":400,"message":"Duplicate tax rate for DE.","errors":[{"code":"InvalidOperation","message":"Duplicate tax rate for DE."}]}]
[error] additional notes: []
[error] Javadoc: http://sphereio.github.io/sphere-jvm-sdk/javadoc/1.0.0-RC1-SNAPSHOT/io/sphere/sdk/client/ErrorResponseException.html
[error] , took 0.229 sec
[error] at io.sphere.sdk.client.ExceptionFactory.lambda$of$31(ExceptionFactory.java:52)
[error] at io.sphere.sdk.client.ExceptionFactory$$Lambda$143/1461123310.apply(Unknown Source)
[error] at io.sphere.sdk.client.ExceptionFactory.lambda$whenStatus$21(ExceptionFactory.java:31)
[error] at io.sphere.sdk.client.ExceptionFactory$$Lambda$137/925081809.apply(Unknown Source)
[error] at io.sphere.sdk.client.ExceptionFactory.createException(ExceptionFactory.java:71)
[error] at io.sphere.sdk.client.SphereClientImpl.createExceptionFor(SphereClientImpl.java:103)
[error] at io.sphere.sdk.client.SphereClientImpl.parse(SphereClientImpl.java:88)
[error] at io.sphere.sdk.client.SphereClientImpl.processHttpResponse(SphereClientImpl.java:82)
[error] at io.sphere.sdk.client.SphereClientImpl.lambda$execute$49(SphereClientImpl.java:57)
[error] at io.sphere.sdk.client.SphereClientImpl$$Lambda$105/2008696824.apply(Unknown Source)
[error] at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
[error] at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
[error] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
[error] at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1954)
[error] at io.sphere.sdk.http.DefaultAsyncHttpClientAdapterImpl.lambda$wrap$5(DefaultAsyncHttpClientAdapterImpl.java:93)
[error] at io.sphere.sdk.http.DefaultAsyncHttpClientAdapterImpl$$Lambda$75/644950868.run(Unknown Source)
[error] at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
[error] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
[error] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
[error] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
[error] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
}
If you get do not get an exception, it may be of importance to know your JVM SDK version, Java version, date of occurrence and operating system.
Describe the behavior you observed and the one you would like to obtain.
*/
public final class TroubleshootingGuide {
private TroubleshootingGuide() {
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy