You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the pkl code generator in Gradle, on Java 22, I get an exception where this is the root cause:
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoSuchMethodError: 'void sun.misc.Unsafe.ensureClassInitialized(java.lang.Class)' [in thread "Execution worker Thread 2"]
at org.pkl.thirdparty.truffle.api.library.LibraryFactory.ensureLibraryInitialized(LibraryFactory.java:384)
at org.pkl.thirdparty.truffle.api.library.LibraryFactory.getUncached(LibraryFactory.java:364)
at org.pkl.thirdparty.truffle.api.library.LibraryFactory.<init>(LibraryFactory.java:210)
at org.pkl.thirdparty.truffle.api.interop.InteropLibraryGen.<init>(InteropLibraryGen.java:178)
at org.pkl.thirdparty.truffle.api.interop.InteropLibraryGen.<clinit>(InteropLibraryGen.java:169)
at org.pkl.thirdparty.truffle.api.library.LibraryFactory.loadGeneratedClass(LibraryFactory.java:791)
at org.pkl.thirdparty.truffle.api.library.LibraryFactory.resolveImpl(LibraryFactory.java:740)
at org.pkl.thirdparty.truffle.api.library.LibraryFactory.resolve(LibraryFactory.java:733)
at org.pkl.thirdparty.truffle.api.interop.InteropLibrary.<clinit>(InteropLibrary.java:2941)
at org.pkl.thirdparty.truffle.polyglot.PolyglotValueDispatch.<clinit>(PolyglotValueDispatch.java:170)
at org.pkl.thirdparty.truffle.polyglot.PolyglotImpl.initialize(PolyglotImpl.java:166)
at org.pkl.thirdparty.graalvm.polyglot.impl.AbstractPolyglotImpl.setConstructors(AbstractPolyglotImpl.java:288)
at org.pkl.thirdparty.graalvm.polyglot.Engine$1.loadAndValidateProviders(Engine.java:1107)
at org.pkl.thirdparty.graalvm.polyglot.Engine$1.run(Engine.java:1067)
at org.pkl.thirdparty.graalvm.polyglot.Engine$1.run(Engine.java:1061)
at org.pkl.thirdparty.graalvm.polyglot.Engine.initEngineImpl(Engine.java:1061)
at org.pkl.thirdparty.graalvm.polyglot.Engine$ImplHolder.<clinit>(Engine.java:143)
at org.pkl.thirdparty.graalvm.polyglot.Engine.getImpl(Engine.java:367)
at org.pkl.thirdparty.graalvm.polyglot.Engine$Builder.build(Engine.java:665)
at org.pkl.core.runtime.VmUtils.<clinit>(VmUtils.java:74)
My projects work ok on Java 21.
The text was updated successfully, but these errors were encountered:
This is a bug report for GraalVM/Truffle, I'm afraid. Pkl runs on GraalVM 23, which is compatible with JDK 17-21. I expect this to simply go away when we bump to a future GraalVM version that supports Java 22.
I think the problem is that Truffle 24+ doesn't support older Java versions.
I have some ideas on how to support a wider range of Java versions and avoid getting stuck on EOL'd Truffle/Graal versions.
I'll start a discussion after the 0.27 release.
I created a minimal Gradle project to demonstrate the issue. https://github.com/edward3h/pkl-java22-unsafe
When using the pkl code generator in Gradle, on Java 22, I get an exception where this is the root cause:
My projects work ok on Java 21.
The text was updated successfully, but these errors were encountered: