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

kotlin-maven-plugin chokes on Java 16 #1103

Open
ipolevoy opened this issue Apr 20, 2021 · 3 comments
Open

kotlin-maven-plugin chokes on Java 16 #1103

ipolevoy opened this issue Apr 20, 2021 · 3 comments

Comments

@ipolevoy
Copy link
Member

See:
https://discuss.kotlinlang.org/t/maven-openjdk16-kotlin-1-4-31-or-1-5-0-m1-llegalaccessexception/21260

[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.4.32:compile (compile) on project activejdbc-kt: Compilation failure
[ERROR] java.lang.ExceptionInInitializerError
[ERROR] 	at com.intellij.pom.java.LanguageLevel.<clinit>(LanguageLevel.java:25)
[ERROR] 	at com.intellij.core.CoreLanguageLevelProjectExtension.<init>(CoreLanguageLevelProjectExtension.java:26)
[ERROR] 	at com.intellij.core.JavaCoreProjectEnvironment.<init>(JavaCoreProjectEnvironment.java:42)
[ERROR] 	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreProjectEnvironment.<init>(KotlinCoreProjectEnvironment.kt:26)
[ERROR] 	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.<init>(KotlinCoreEnvironment.kt:121)
[ERROR] 	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:425)
[ERROR] 	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:226)
[ERROR] 	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:152)
[ERROR] 	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
[ERROR] 	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
[ERROR] 	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
[ERROR] 	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
[ERROR] 	at org.jetbrains.kotlin.maven.KotlinCompileMojoBase.execCompiler(KotlinCompileMojoBase.java:228)
[ERROR] 	at org.jetbrains.kotlin.maven.K2JVMCompileMojo.execCompiler(K2JVMCompileMojo.java:237)
[ERROR] 	at org.jetbrains.kotlin.maven.K2JVMCompileMojo.execCompiler(K2JVMCompileMojo.java:55)
[ERROR] 	at org.jetbrains.kotlin.maven.KotlinCompileMojoBase.execute(KotlinCompileMojoBase.java:209)
[ERROR] 	at org.jetbrains.kotlin.maven.K2JVMCompileMojo.execute(K2JVMCompileMojo.java:222)
[ERROR] 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR] 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR] 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR] Caused by: 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 @9f86dc3
[ERROR] 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
[ERROR] 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
[ERROR] 	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
[ERROR] 	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
[ERROR] 	at com.intellij.util.ReflectionUtil.makeAccessible(ReflectionUtil.java:252)
[ERROR] 	at com.intellij.util.ReflectionUtil.getDeclaredMethod(ReflectionUtil.java:269)
[ERROR] 	at com.intellij.DynamicBundle.<clinit>(DynamicBundle.java:22)
[ERROR] 	... 39 more
[ERROR] 

@ipolevoy
Copy link
Member Author

@davy-claisse , is there any news from the Kotlin community? I'd like to release v 3.0 soon, but the activejdbc-kt module is still disconnected.

@davy-claisse
Copy link
Contributor

Hi @ipolevoy

Sorry for the very long delay to answer you (is there any way to send you private messages ?)

Beside that, and in order to solve our problem, I tried to build the master branch but unfortunately one unit test failed:

[ERROR] Errors: 
[ERROR]   ArrayTypeSpec.shouldSaveArrays:76 » Init Failed to find table: salaried_employ...

I guess some prerequisites are required now that I don't have.

Here my build configuration.

$ mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /home/dc/.install/links/apache-maven
Java version: 17.0.4.1, vendor: Eclipse Adoptium, runtime: /home/dc/.install/apps/adoptium-jdk-17.0.4.1+1-x64
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-125-generic", arch: "amd64", family: "unix"

How can I build ActiveJDBC on my computer ? Should I setup something except the JDK and Maven ?

@ipolevoy
Copy link
Member Author

ipolevoy commented Sep 7, 2022

@davy-claisse , feel free to connect with me on Linkedin: https://www.linkedin.com/in/ipolevoy/.

The current JavaLite version is 3.0-SNAPSHOT and builds on Java 16, see: https://javalite.io/releases.

hope this helps. I will be releasing version 3.0 soon, and then will move to Java 17 - FYI.

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

No branches or pull requests

2 participants