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

NetBeans bundled Truffle Version incompatbile with JDK 22 #7245

Closed
Manmej opened this issue Apr 5, 2024 · 6 comments · Fixed by #7268
Closed

NetBeans bundled Truffle Version incompatbile with JDK 22 #7245

Manmej opened this issue Apr 5, 2024 · 6 comments · Fixed by #7268
Labels
kind:bug Bug report or fix priority:high High priority issue that should, if possible, be fixed in next release

Comments

@Manmej
Copy link

Manmej commented Apr 5, 2024

Apache NetBeans version

Apache NetBeans 21

What happened

messages.log

Language / Project Type / NetBeans Component

No response

How to reproduce

Just create a new project File>New Project > HTML5/Javascript >HTML/JS Aplication

Did this work correctly in an earlier version?

Apache NetBeans 18

Operating System

Windows 11 Home x64

JDK

jdk-22_Windows_x64

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

Yes

@Manmej Manmej added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Apr 5, 2024
@matthiasblaesing matthiasblaesing changed the title Error creating new project NetBeans bundled Truffle Version incompatbile with JDK 22 Apr 5, 2024
@matthiasblaesing matthiasblaesing added priority:high High priority issue that should, if possible, be fixed in next release and removed needs:triage Requires attention from one of the committers labels Apr 5, 2024
@matthiasblaesing
Copy link
Contributor

This is truffle (the basis for the JS engine) being incompatbile with JDK 22:

    [exec] INFO [org.netbeans.ui.indexing]: Indexing started, time from last indexing 2.251 ms.
     [exec] INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 0 ms.
     [exec] SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.openide.WizardDescriptor$Listener$2$1
     [exec] java.lang.NoSuchMethodError: 'void sun.misc.Unsafe.ensureClassInitialized(java.lang.Class)'
     [exec] 	at com.oracle.truffle.api.library.LibraryFactory.ensureLibraryInitialized(LibraryFactory.java:339)
     [exec] 	at com.oracle.truffle.api.library.LibraryFactory.getUncached(LibraryFactory.java:320)
     [exec] 	at com.oracle.truffle.api.library.LibraryFactory.<init>(LibraryFactory.java:205)
     [exec] 	at com.oracle.truffle.api.interop.InteropLibraryGen.<init>(InteropLibraryGen.java:134)
     [exec] 	at com.oracle.truffle.api.interop.InteropLibraryGen.<clinit>(InteropLibraryGen.java:125)
     [exec] 	at java.base/java.lang.Class.forName0(Native Method)
     [exec] 	at java.base/java.lang.Class.forName(Class.java:529)
     [exec] 	at java.base/java.lang.Class.forName(Class.java:508)
     [exec] 	at com.oracle.truffle.api.library.LibraryFactory.loadGeneratedClass(LibraryFactory.java:669)
     [exec] 	at com.oracle.truffle.api.library.LibraryFactory.resolveImpl(LibraryFactory.java:632)
     [exec] 	at com.oracle.truffle.api.library.LibraryFactory.resolve(LibraryFactory.java:625)

matthiasblaesing added a commit to matthiasblaesing/netbeans that referenced this issue Apr 5, 2024
matthiasblaesing added a commit to matthiasblaesing/netbeans that referenced this issue Apr 6, 2024
matthiasblaesing added a commit to matthiasblaesing/netbeans that referenced this issue Apr 6, 2024
matthiasblaesing added a commit to matthiasblaesing/netbeans that referenced this issue Apr 7, 2024
@matthiasblaesing
Copy link
Contributor

@Manmej please test if PR #7248 fixes your problem. You can download a nightly build from the checks page (Artifacts dropdown, https://github.com/apache/netbeans/pull/7248/checks) or directly https://github.com/apache/netbeans/suites/22509804037/artifacts/1392177585.

@matthiasblaesing
Copy link
Contributor

Forget it - it does not work

@sdedic
Copy link
Member

sdedic commented Apr 9, 2024

FWIW the error reported in the log is just a "side effect" of insufficient protection against linkage errors in script engines. When I tried to debug the issue, the HTML client project Wizard actually asked for freemaker scripting engine. But the Scripting initialization attempted to load (registered) JS engine, and the LinkageError aborted the whole process.

this issue should be solved separately from #7248 to avoid further similar issues.

@MartinBalin
Copy link
Contributor

I've seen the above exception as well but when I invoke New from template again it works.

@sdedic
Copy link
Member

sdedic commented Apr 10, 2024

Yes, according to my testing, 1st exception was a ServiceConfigurationError, but subsequent exceptions are caught by Scripting infrastructure and the operation (actually asking for freemaker) proceeds. The outcome depends on what operation triggers the 1st exception - that one fails now: the New from Template action - or for example proxy PAC evaluation running delayed on the background. Or some network-related operation that indirectly triggers proxy eval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix priority:high High priority issue that should, if possible, be fixed in next release
Projects
None yet
4 participants