You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.NoClassDefFoundError: com/google/gson/internal/reflect/ReflectionAccessor
at com.ibm.cloud.sdk.core.util.DynamicModelTypeAdapterFactory.(DynamicModelTypeAdapterFactory.java:77)
at com.ibm.cloud.sdk.core.util.GsonSingleton.registerTypeAdapters(GsonSingleton.java:77)
at com.ibm.cloud.sdk.core.util.GsonSingleton.createGson(GsonSingleton.java:53)
at com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting(GsonSingleton.java:102)
at com.ibm.cloud.sdk.core.http.RequestBuilder.bodyContent(RequestBuilder.java:417)
at com.ibm.cloud.cloudant.v1.Cloudant.postDocument(Cloudant.java:825)
To Reproduce
call com.ibm.cloud.cloudant.v1.Cloudant.postDocument() using
FWIW the GSON problems you link to (that are motivating you to use 2.9) are caused by changes in visibility to internal classes in Java 9+, that were warnings prior to Java 16. This is exact reason why we declare support for running only on Java 8 and 11 currently.
It is possible to use this library with Java 16 and GSON 2.8.9 by supplying the JVM option to switch the error back to a warning or by breaking encapsulation - see IBM/java-sdk-core#127 (comment). It is worth noting that Java 16 is not a maintained Java version anyway; in Java 17 the option to switch the error back to a warning has been removed and breaking encapsulation is the only workaround.
Describe the bug
To Reproduce
call
com.ibm.cloud.cloudant.v1.Cloudant.postDocument()
usingand
Unfortunately I can't use an earlier version of GSON because of this:
google/gson#1875
and this
google/gson#1902
Must gather (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: