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
When using jooby-guice 2.12.0, adoptopenjdk 11.0.12.7 this results in a warning:
Click to expand!
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (jar:file:/C:/Users/user/.m2/repository/com/google/inject/guice/4.2.3/guice-4.2.3.jar!/) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I think this warning became an error in java15.
When using jooby-guice 2.12.0, adoptopenjdk 17.0.1.12 this results in a runtime error:
Click to expand!
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Unable to load cache item
...
Caused by: com.google.inject.internal.cglib.core.$CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @6d5de79a
at myproj//com.google.inject.internal.cglib.core.$ReflectUtils.defineClass(ReflectUtils.java:464)
at myproj//com.google.inject.internal.cglib.core.$AbstractClassGenerator.generate(AbstractClassGenerator.java:339)
at myproj//com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:96)
at myproj//com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:94)
at myproj//com.google.inject.internal.cglib.core.internal.$LoadingCache$2.call(LoadingCache.java:54)
at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
at myproj//com.google.inject.internal.cglib.core.internal.$LoadingCache.createEntry(LoadingCache.java:61)
at myproj//com.google.inject.internal.cglib.core.internal.$LoadingCache.get(LoadingCache.java:34)
at myproj//com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:119)
at myproj//com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:294)
at myproj//com.google.inject.internal.cglib.core.$KeyFactory$Generator.create(KeyFactory.java:221)
at myproj//com.google.inject.internal.cglib.core.$KeyFactory.create(KeyFactory.java:174)
at myproj//com.google.inject.internal.cglib.core.$KeyFactory.create(KeyFactory.java:157)
at myproj//com.google.inject.internal.cglib.core.$KeyFactory.create(KeyFactory.java:149)
at myproj//com.google.inject.internal.cglib.core.$KeyFactory.create(KeyFactory.java:145)
at myproj//com.google.inject.internal.cglib.core.$MethodWrapper.(MethodWrapper.java:23)
... 93 common frames omitted
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @6d5de79a
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
at myproj//com.google.inject.internal.cglib.core.$ReflectUtils$1.run(ReflectUtils.java:61)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at myproj//com.google.inject.internal.cglib.core.$ReflectUtils.(ReflectUtils.java:52)
at myproj//com.google.inject.internal.cglib.reflect.$FastClassEmitter.(FastClassEmitter.java:67)
... 90 common frames omitted
A stopgap solution is to add jvm argument: --add-opens java.base/java.lang=ALL-UNNAMED
Guice 4-branch is incompatible with java modules system, please consider upgrading jooby-guice to version 5 https://github.com/google/guice/wiki/Guice501
When using jooby-guice 2.12.0, adoptopenjdk 11.0.12.7 this results in a warning:
Click to expand!
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (jar:file:/C:/Users/user/.m2/repository/com/google/inject/guice/4.2.3/guice-4.2.3.jar!/) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future releaseI think this warning became an error in java15.
When using jooby-guice 2.12.0, adoptopenjdk 17.0.1.12 this results in a runtime error:
Click to expand!
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Unable to load cache item ... Caused by: com.google.inject.internal.cglib.core.$CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @6d5de79a at myproj//com.google.inject.internal.cglib.core.$ReflectUtils.defineClass(ReflectUtils.java:464) at myproj//com.google.inject.internal.cglib.core.$AbstractClassGenerator.generate(AbstractClassGenerator.java:339) at myproj//com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:96) at myproj//com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:94) at myproj//com.google.inject.internal.cglib.core.internal.$LoadingCache$2.call(LoadingCache.java:54) at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) at myproj//com.google.inject.internal.cglib.core.internal.$LoadingCache.createEntry(LoadingCache.java:61) at myproj//com.google.inject.internal.cglib.core.internal.$LoadingCache.get(LoadingCache.java:34) at myproj//com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:119) at myproj//com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:294) at myproj//com.google.inject.internal.cglib.core.$KeyFactory$Generator.create(KeyFactory.java:221) at myproj//com.google.inject.internal.cglib.core.$KeyFactory.create(KeyFactory.java:174) at myproj//com.google.inject.internal.cglib.core.$KeyFactory.create(KeyFactory.java:157) at myproj//com.google.inject.internal.cglib.core.$KeyFactory.create(KeyFactory.java:149) at myproj//com.google.inject.internal.cglib.core.$KeyFactory.create(KeyFactory.java:145) at myproj//com.google.inject.internal.cglib.core.$MethodWrapper.(MethodWrapper.java:23) ... 93 common frames omitted Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @6d5de79a at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) at java.base/java.lang.reflect.Method.setAccessible(Method.java:193) at myproj//com.google.inject.internal.cglib.core.$ReflectUtils$1.run(ReflectUtils.java:61) at java.base/java.security.AccessController.doPrivileged(AccessController.java:569) at myproj//com.google.inject.internal.cglib.core.$ReflectUtils.(ReflectUtils.java:52) at myproj//com.google.inject.internal.cglib.reflect.$FastClassEmitter.(FastClassEmitter.java:67) ... 90 common frames omittedA stopgap solution is to add jvm argument:
--add-opens java.base/java.lang=ALL-UNNAMED
Referencing similar issues:
eclipse/xtext-core#506 google/guice#1133
The text was updated successfully, but these errors were encountered: