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

8.5: build fails with NoClassDefFoundError: javaslang.λ in compileKotlin if building with Semeru JDK #27273

Closed
vlsi opened this issue Dec 4, 2023 · 1 comment
Labels
closed:kotlin An issue with the Kotlin plugins from JetBrains

Comments

@vlsi
Copy link
Contributor

vlsi commented Dec 4, 2023

Current Behavior

Gradle build fails if running with Semeru JVM 8, 11, and 17 (there's no Semeru 21 yet)

https://github.com/pgjdbc/pgjdbc/actions/runs/7083932936/job/19277224151#step:8:63

/opt/hostedtoolcache/gradle/8.5/x64/bin/gradle --no-daemon -PincludeTestTags=none() | org.postgresql.test.XaTests -PtestExtraJvmArgs= -PjdkBuildVersion=17 -PjdkTestVersion=8 -PjdkTestVendor= -Porg.gradle.java.installations.auto-download=false --scan --no-build-cache --no-parallel --no-daemon jandex test -Duser.country=DE -Duser.language=de

Welcome to Gradle 8.5!

Here are the highlights of this release:
 - Support for running on Java 21
 - Faster first use with Kotlin DSL
 - Improved error and warning messages

For more details see https://docs.gradle.org/8.5/release-notes.html

	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:256)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:247)
	at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:247)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:87)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:43)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:165)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:50)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:104)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:48)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:463)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:62)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.doCompile(IncrementalCompilerRunner.kt:477)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:[40](https://github.com/pgjdbc/pgjdbc/actions/runs/7083932936/job/19277224151#step:8:41)0)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:281)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:125)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:657)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:105)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1620)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:[43](https://github.com/pgjdbc/pgjdbc/actions/runs/7083932936/job/19277224151#step:8:44))
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:784)
	at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:718)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:857)
Caused by: java.lang.ClassNotFoundException: javaslang.λ
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:827)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:[109](https://github.com/pgjdbc/pgjdbc/actions/runs/7083932936/job/19277224151#step:8:110)5)
	... 74 more


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':build-logic-commons:gradle-plugin:compileKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Internal compiler error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org./

BUILD FAILED in 1m 25s
9 actionable tasks: 9 executed

Expected Behavior

compileKotlin should not fail as it completes successfully with other JVMs

Context (optional)

https://github.com/pgjdbc/pgjdbc/actions/runs/7083932936/job/19277224151
https://youtrack.jetbrains.com/issue/KT-63502/Getting-java.lang.ClassNotFoundException-javaslang.l-during-compilation

Steps to Reproduce

I can't reproduce it locally, however, it reproduces reliably in GitHub Actions for me, so can try debug logging or execute a different Gradle version if that helps.

Gradle version

8.5

Gradle version that used to work

8.4

Build scan URL (optional)

https://gradle.com/s/pjauzg7nq3jsu

Your Environment (optional)

No response

@ov7a
Copy link
Member

ov7a commented Dec 5, 2023

Sorry that you're having trouble with Gradle!

This is an issue with Kotlin.


See also:

@ov7a ov7a closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2023
@ov7a ov7a added closed:kotlin An issue with the Kotlin plugins from JetBrains and removed a:regression This used to work to-triage labels Dec 5, 2023
redalogobject pushed a commit to logobject/pgjdbc that referenced this issue Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:kotlin An issue with the Kotlin plugins from JetBrains
Projects
None yet
Development

No branches or pull requests

2 participants