Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven project run gives naccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass #33

Open
madukan opened this issue Jul 6, 2022 · 0 comments

Comments

@madukan
Copy link

madukan commented Jul 6, 2022

Hi, I tried following https://www.youtube.com/watch?v=rVo_CeDaA8s
Using Apache Maven 3.8.6 and JDK 17.0.2.

Upon mvn clean install, I consistently get the following error:

[INFO] --- gwt-maven-plugin:1.0.1:compile (default) @ ttt ---
[INFO] Compiling module ttt.ttt
[INFO] Computing all possible rebind results for 'com.gwtplatform.mvp.client.ApplicationController'
[INFO] Rebinding com.gwtplatform.mvp.client.ApplicationController
[INFO] Invoking generator com.gwtplatform.mvp.rebind.ApplicationControllerGenerator
[INFO] [ERROR] Generator 'com.gwtplatform.mvp.rebind.ApplicationControllerGenerator' threw an exception while rebinding 'com.gwtplatform.mvp.client.ApplicationController'
[INFO] com.google.inject.internal.util.$ComputationException: java.lang.ExceptionInInitializerError
[INFO] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
[INFO] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
[INFO] at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
[INFO] at com.google.inject.internal.FailableCache.get(FailableCache.java:50)
[INFO] at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49)
[INFO] at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:125)
[INFO] at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:507)
[INFO] at com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:159)
[INFO] at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:44)
[INFO] at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:122)
[INFO] at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
[INFO] at com.google.inject.Guice.createInjector(Guice.java:95)
.
.
.
[INFO] Caused by: java.lang.ExceptionInInitializerError
[INFO] at com.google.inject.internal.cglib.reflect.$FastClassEmitter.(FastClassEmitter.java:67)
[INFO] at com.google.inject.internal.cglib.reflect.$FastClass$Generator.generateClass(FastClass.java:72)
[INFO] at com.google.inject.internal.cglib.core.$DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
[INFO] at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:216)
[INFO] at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:64)
[INFO] at com.google.inject.internal.BytecodeGen.newFastClass(BytecodeGen.java:207)
[INFO] at com.google.inject.internal.DefaultConstructionProxyFactory.create(DefaultConstructionProxyFactory.java:53)
[INFO] at com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:153)
[INFO] at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:89)
[INFO] at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:28)
[INFO] at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:36)
[INFO] at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:32)
[INFO] at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:39)
[INFO] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)
[INFO] ... 75 more
[INFO] 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 @7634b327
[INFO] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
[INFO] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
[INFO] at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
[INFO] at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
[INFO] at com.google.inject.internal.cglib.core.$ReflectUtils$2.run(ReflectUtils.java:56)
[INFO] at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
[INFO] at com.google.inject.internal.cglib.core.$ReflectUtils.(ReflectUtils.java:46)
[INFO] ... 89 more
[INFO] [ERROR] Errors in 'gen/com/google/gwt/lang/ttt_00046ttt__EntryMethodHolder.java'
[INFO] [ERROR] Line 3: Failed to resolve 'com.gwtplatform.mvp.client.ApplicationController' via deferred binding
[INFO] [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
[INFO] [WARN] com.gwtplatform.mvp.client.ClientGinjector
[INFO] [WARN] com.gwtplatform.mvp.client.ApplicationControllerImpl
[INFO] -----------------------------------------------------------------------

Could you please help to get this working?
I was able to GWT default application working fine. However Maven and GWT doesn't seem to be in sync too well. Maven projects give this same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant