My program is not working, please help. #1179
Unanswered
aglasencnik
asked this question in
Q&A
Replies: 1 comment 2 replies
-
The same problem has now. Maybe you can remember how you solve this problem? |
Beta Was this translation helpful? Give feedback.
2 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Hi, I have a problem, maybe you could help me. When I try to make a simple program in Java using Language Translation, i get an exception and a lot of error messages on runtime. My code is the same as in the documentation for listing all languages, (link below) and errors are written below. Also I mad sure my code doesn't have any errors when writting code as well as in pom.xml file. Thanks for any advice.
Link: https://cloud.ibm.com/apidocs/language-translator?code=java#listlanguages
Errors:
Exception in thread "main" java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @c0edf29 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177) at java.base/java.lang.reflect.Field.setAccessible(Field.java:171) at com.google.gson.internal.reflect.UnsafeReflectionAccessor.makeAccessible(UnsafeReflectionAccessor.java:44) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:159) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.Gson.fromJson(Gson.java:931) at com.ibm.cloud.sdk.core.util.ResponseUtils.getValue(ResponseUtils.java:149) at com.ibm.cloud.sdk.core.util.ResponseConverterUtils$6.convert(ResponseConverterUtils.java:137) at com.ibm.cloud.sdk.core.security.TokenRequestBasedAuthenticator$2.run(TokenRequestBasedAuthenticator.java:320) at java.base/java.lang.Thread.run(Thread.java:831)
Beta Was this translation helpful? Give feedback.
All reactions