Modify

Opened 2 years ago

Closed 10 months ago

#23368 closed defect (fixed)

Error loading JOSM scripting plugin with GraalVM

Reported by: zelonewolf@… Owned by: Gubaer
Priority: normal Milestone:
Component: Plugin scripting Version: latest
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Run JOSM as follows

/usr/bin/java \

--module-path "/home/brian/Dropbox/OSM/JOSM/graaljs/lib" \
--add-modules org.graalvm.sdk,org.graalvm.js,com.oracle.truffle.regex,org.graalvm.truffle \
-Xmx32G -jar josm-latest.jar

  1. Java version is:

java version "19.0.2" 2023-01-17
Java(TM) SE Runtime Environment (build 19.0.2+7-44)
Java HotSpot(TM) 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

  1. JOSM version is 18924
  2. Go to Scripting->Show Scripting console

What is the expected result?

Open scripting console

What happens instead?

Stack trace

Please provide any additional information below. Attach a screenshot if possible.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-12-22 12:48:53 +0100 (Fri, 22 Dec 2023)
Revision:18924
Build-Date:2023-12-23 02:31:03
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18924 en) Linux Ubuntu 22.04.3 LTS
Memory Usage: 512 MB / 32768 MB (255 MB allocated, but free)
Java version: 19.0.2+7-44, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: ubuntu:GNOME
libcommons-compress-java: libcommons-compress-java:all-1.21-1
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:-
liboauth-signpost-java: liboauth-signpost-java:all-1.2.1.2-3
VM arguments: [--module-path=${HOME}/Dropbox/OSM/JOSM/graaljs/lib, --add-modules=org.graalvm.sdk,org.graalvm.js,com.oracle.truffle.regex,org.graalvm.truffle]

Plugins:
+ apache-commons (36176)
+ ejml (36176)
+ geotools (36176)
+ jackson (36176)
+ jaxb (36118)
+ jts (36004)
+ opendata (36186)
+ reverter (36126)
+ scripting (v0.3.0)
+ todo (137)
+ utilsplugin2 (36178)

Last errors/warnings:
- 00005.183 W: Cannot lock cache directory. Will not use disk cache
- 00006.772 W: Cannot start IPv4 remotecontrol server on port 8111: Address already in use
- 00006.774 W: Cannot start IPv6 remotecontrol server on port 8111: Address already in use
- 00017.292 E: Handled by bug report queue: org.graalvm.polyglot.PolyglotException: java.lang.UnsupportedClassVersionError: com/oracle/truffle/api/impl/JDKAccessor has been compiled by a more recent version of the Java Runtime (class file version 64.0), this version of the Java Runtime only recognizes class file versions up to 63.0
- 00033.736 E: Handled by bug report queue: org.graalvm.polyglot.PolyglotException: java.lang.UnsupportedClassVersionError: com/oracle/truffle/api/impl/JDKAccessor has been compiled by a more recent version of the Java Runtime (class file version 64.0), this version of the Java Runtime only recognizes class file versions up to 63.0



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (38) of main
org.graalvm.polyglot.PolyglotException: java.lang.UnsupportedClassVersionError: com/oracle/truffle/api/impl/JDKAccessor has been compiled by a more recent version of the Java Runtime (class file version 64.0), this version of the Java Runtime only recognizes class file versions up to 63.0
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.enterThreadChanged(PolyglotContextImpl.java:792)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotEngineImpl.enterCached(PolyglotEngineImpl.java:2033)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotEngineImpl.enterIfNeeded(PolyglotEngineImpl.java:1961)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueDispatch.hostEnter(PolyglotValueDispatch.java:1259)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.getBindings(PolyglotContextImpl.java:1214)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextDispatch.getBindings(PolyglotContextDispatch.java:98)
	at org.graalvm.sdk/org.graalvm.polyglot.Context.getBindings(Context.java:564)
	at org.openstreetmap.josm.plugins.scripting.graalvm.GraalVMFacade.populateContext(GraalVMFacade.java:41)
	at org.openstreetmap.josm.plugins.scripting.graalvm.GraalVMFacade.initContext(GraalVMFacade.java:92)
	at org.openstreetmap.josm.plugins.scripting.graalvm.GraalVMFacade.<init>(GraalVMFacade.java:97)
	at org.openstreetmap.josm.plugins.scripting.graalvm.GraalVMFacadeFactory.createGraalVMFacade(GraalVMFacadeFactory.java:38)
	at org.openstreetmap.josm.plugins.scripting.graalvm.GraalVMFacadeFactory.getOrCreateGraalVMFacade(GraalVMFacadeFactory.java:49)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptEditorModel.selectDefaultScriptEngine(ScriptEditorModel.java:50)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptEditorModel.<init>(ScriptEditorModel.java:66)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptEditor.build(ScriptEditor.java:84)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptEditor.<init>(ScriptEditor.java:116)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptingConsolePanel.buildInputPanel(ScriptingConsolePanel.java:51)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptingConsolePanel.buildSplitPane(ScriptingConsolePanel.java:79)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptingConsolePanel.build(ScriptingConsolePanel.java:89)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptingConsolePanel.<init>(ScriptingConsolePanel.java:165)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptingConsole.build(ScriptingConsole.java:139)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptingConsole.<init>(ScriptingConsole.java:102)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptingConsole.showScriptingConsole(ScriptingConsole.java:58)
	at org.openstreetmap.josm.plugins.scripting.ui.console.ScriptingConsole.toggleScriptingConsole(ScriptingConsole.java:92)
	at org.openstreetmap.josm.plugins.scripting.ui.ToggleConsoleAction.actionPerformed(ToggleConsoleAction.java:42)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:411)
	at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1029)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1073)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6620)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
	at java.desktop/java.awt.Component.processEvent(Component.java:6385)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4995)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4827)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4827)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
	Suppressed: Attached Guest Language Frames (0)
Internal GraalVM error, please report at https://github.com/oracle/graal/issues/.

Attachments (0)

Change History (2)

comment:1 by taylor.smock, 2 years ago

Java version: 19.0.2+7-44, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM

You need to be running Java 20 or later. 21 is the current LTS.

comment:2 by Gubaer, 10 months ago

Resolution: fixed
Status: newclosed

The scripting plugin currently supports Java 17 or Java 21.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Gubaer.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.