Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 26 characters in body
Source Link
Kirby
  • 16k
  • 11
  • 97
  • 110

I faced the same issue after import ofimporting an existing Springboot project based on JDK1.8 into SpringTestSuite4. once executed to startWhen I started the application on an embedded tomcatTomcat server, I got this error as -

"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 @140c9f39 %09"

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 @140c9f39 %09

Once I added the pre installed-installed JDK1.8 JRE from my pcPC to SpringTestSuite4 in the Installed JRE section under Window -> Preferences -> Java and made the added JRE the default. Then I clicked on applyApply and closethen Close.

It worked for me.

I faced the same issue after import of existing Springboot project based on JDK1.8 into SpringTestSuite4. once executed to start the application on embedded tomcat server got error as -

"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 @140c9f39 %09"

Once I added pre installed JDK1.8 JRE from my pc to SpringTestSuite4 in Installed JRE section under Window -> Preferences -> Java and made the added JRE default. Then clicked on apply and close.

It worked for me.

I faced the same issue after importing an existing Springboot project based on JDK1.8 into SpringTestSuite4. When I started the application on an embedded Tomcat server, I got this error

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 @140c9f39 %09

I added the pre-installed JDK1.8 JRE from my PC to SpringTestSuite4 in the Installed JRE section under Window -> Preferences -> Java and made the added JRE the default. Then I clicked on Apply and then Close.

It worked for me.

Source Link
Ramanuj
  • 71
  • 1
  • 2

I faced the same issue after import of existing Springboot project based on JDK1.8 into SpringTestSuite4. once executed to start the application on embedded tomcat server got error as -

"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 @140c9f39 %09"

Once I added pre installed JDK1.8 JRE from my pc to SpringTestSuite4 in Installed JRE section under Window -> Preferences -> Java and made the added JRE default. Then clicked on apply and close.

It worked for me.