Gavin Ray
06/20/2021, 6:59 PM21.2.0-dev JDK16
Quarkus has Kotlin version set to "1.4.32"
and haven't yet merged their PR for upgrading to 1.5
I'm not sure what this error means -- but what is happening is that on first-load, my app is fine.
Then when I save and the in-process recompilation happens, it throws this error:
java.lang.RuntimeException: Unable to invoke Kotlin compiler. java.lang.ExceptionInInitializerError
at com.intellij.pom.java.LanguageLevel.<clinit>(LanguageLevel.java:25)
at com.intellij.core.CoreLanguageLevelProjectExtension.<init>(CoreLanguageLevelProjectExtension.java:26)
at com.intellij.core.JavaCoreProjectEnvironment.<init>(JavaCoreProjectEnvironment.java:42)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreProjectEnvironment.<init>(KotlinCoreProjectEnvironment.kt:26)
Resulted in: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.util.ResourceBundle.setParent(java.util.ResourceBundle) accessible: module java.base does not "opens java.util" to unnamed module @47d9a273
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
... 23 more
at io.quarkus.kotlin.deployment.KotlinCompilationProvider.compile(KotlinCompilationProvider.java:81)
I have googled for some hours, and tried the following (kotlinOptions.jvmTarget
= 11
)
tasks.withType<JavaCompile> {
options.fork(mapOf(Pair("jvmArgs", listOf("--add-opens", "java.base/java.util=ALL-UNNAMED"))))
}
org.gradle.jvmargs=--illegal-access=permit -Dkotlin.daemon.jvm.options=--illegal-access=permit
Is there any way to make this work 🤔gildor
06/21/2021, 4:34 AM