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:
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED