Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

tvdformat.jar doesn't work with Java 22 #279

Open
zjullion opened this issue Aug 19, 2024 · 1 comment
Open

tvdformat.jar doesn't work with Java 22 #279

zjullion opened this issue Aug 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zjullion
Copy link

Exception in thread "main" java.lang.NoSuchMethodError: 'void sun.misc.Unsafe.ensureClassInitialized(java.lang.Class)'
        at com.oracle.truffle.api.library.LibraryFactory.ensureLibraryInitialized(LibraryFactory.java:385)
        at com.oracle.truffle.api.library.LibraryFactory.getUncached(LibraryFactory.java:365)
        at com.oracle.truffle.api.library.LibraryFactory.<init>(LibraryFactory.java:211)
        at com.oracle.truffle.api.interop.InteropLibraryGen.<init>(InteropLibraryGen.java:178)
        at com.oracle.truffle.api.interop.InteropLibraryGen.<clinit>(InteropLibraryGen.java:169)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:529)
        at java.base/java.lang.Class.forName(Class.java:508)
        at com.oracle.truffle.api.library.LibraryFactory.loadGeneratedClass(LibraryFactory.java:799)
        at com.oracle.truffle.api.library.LibraryFactory.resolveImpl(LibraryFactory.java:748)
        at com.oracle.truffle.api.library.LibraryFactory.resolve(LibraryFactory.java:741)
        at com.oracle.truffle.api.interop.InteropLibrary.<clinit>(InteropLibrary.java:2941)
        at com.oracle.truffle.polyglot.PolyglotValueDispatch.<clinit>(PolyglotValueDispatch.java:167)
        at com.oracle.truffle.polyglot.PolyglotImpl.initialize(PolyglotImpl.java:199)
        at org.graalvm.polyglot.Engine.loadAndValidateProviders(Engine.java:1686)
        at org.graalvm.polyglot.Engine$1.run(Engine.java:1712)
        at org.graalvm.polyglot.Engine$1.run(Engine.java:1707)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
        at org.graalvm.polyglot.Engine.initEngineImpl(Engine.java:1707)
        at org.graalvm.polyglot.Engine$ImplHolder.<clinit>(Engine.java:190)
        at org.graalvm.polyglot.Engine.getImpl(Engine.java:442)
        at org.graalvm.polyglot.HostAccess$Builder.targetTypeMapping(HostAccess.java:1282)
        at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.createNashornHostAccess(GraalJSScriptEngine.java:107)
        at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.<clinit>(GraalJSScriptEngine.java:102)
        at com.trivadis.plsql.formatter.TvdFormat.<init>(TvdFormat.java:20)
        at com.trivadis.plsql.formatter.TvdFormat.main(TvdFormat.java:48)
@PhilippSalvisberg PhilippSalvisberg added the bug Something isn't working label Aug 20, 2024
@PhilippSalvisberg
Copy link
Collaborator

Thanks @zjullion for reporting this issue. Yes, I can reproduce this behaviour with JDK 22. It works with JDK 21.

The included GraalVM JavaScript engine is not compatible with JDK 22. See https://github.com/Trivadis/plsql-formatter-settings/blob/sqldev-23.1.0/standalone/pom.xml#L16 and oracle/graaljs#825 .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants