Skip to content
Advertisement

SpringBoot 2.2.1 groovyMarkupConfigurer exception

I have a SpringBoot application that was developed with JDK8 and was now ported to JDK11. I get the following exception at startup:

JavaScript

Here is my pom.xml:

JavaScript

I have tried SpringWebStarter from 2.1.8 up to 2.2.1, I am always getting the same error.
I cannot use JDK8 again, since the computer has been updated from Windows 7 to Windows 10 and I am not willed to register at Oracle to download the JDK8 😉

Has someone experienced this issue or does anyone have an idea how to solve this?

Advertisement

Answer

Your error is related to Java module system:

java.lang.reflect.InaccessibleObjectException: Unable to make jdk.internal.loader.ClassLoaders$AppClassLoader(jdk.internal.loader.ClassLoaders$PlatformClassLoader,jdk.internal.loader.URLClassPath) accessible: module java.base does not “opens jdk.internal.loader” to unnamed module @2e3967ea

Judging from the stack trace this is caused by Groovy so either your are using an old Groovy version that doesn’t support JDK 9 or running code that imports jdk.internal.loader without declaring proper Java module access.

I’d start by checking that you have recent Groovy dependencies but a quick workaround would be to run the JVM with:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement