Opened 2 years ago
Last modified 2 years ago
#22505 new defect
NoClassDefFoundError: org/graalvm/polyglot/Engine
Reported by: | anonymous | Owned by: | Gubaer |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin scripting | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Scripting > Configure
What is the expected result?
I should see a new window to the classpath
What happens instead?
An error message appeared.
Please provide any additional information below. Attach a screenshot if possible.
Revision:18583 Build-Date:2022-11-01 14:35:40 Identification: JOSM/1.5 (18583 en) Windows 11 64-Bit OS Build number: Windows 10 Pro 2009 (22000) Memory Usage: 364 MB / 8132 MB (87 MB allocated, but free) Java version: 17.0.5+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (scaling 1.25×1.25) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: Cp1252 System property sun.jnu.encoding: Cp1252 Locale info: en_US Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Djpackage.app-version=1.5.18583, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe] Plugins: + reverter (36011) + scripting (v0.2.7) Last errors/warnings: - 00000.364 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF' - 00000.367 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF' - 00000.933 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available - 00002.122 W: Update plugins - You updated your JOSM software. To prevent problems the plugins should be updated as well. Update plugins now? - 00185.556 E: Handled by bug report queue: java.lang.NoClassDefFoundError: org/graalvm/polyglot/Engine. Cause: java.lang.ClassNotFoundException: org.graalvm.polyglot.Engine - 00203.406 E: Handled by bug report queue: java.lang.NoClassDefFoundError: org/graalvm/polyglot/Engine. Cause: java.lang.ClassNotFoundException: org.graalvm.polyglot.Engine - 00253.829 E: Handled by bug report queue: java.lang.NoClassDefFoundError: org/graalvm/polyglot/Engine. Cause: java.lang.ClassNotFoundException: org.graalvm.polyglot.Engine === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (23) of main java.lang.NoClassDefFoundError: org/graalvm/polyglot/Engine at com.oracle.truffle.js.scriptengine.GraalJSEngineFactory.createDefaultEngine(GraalJSEngineFactory.java:122) at com.oracle.truffle.js.scriptengine.GraalJSEngineFactory.getPolyglotEngine(GraalJSEngineFactory.java:134) at com.oracle.truffle.js.scriptengine.GraalJSEngineFactory.getEngineVersion(GraalJSEngineFactory.java:148) at org.openstreetmap.josm.plugins.scripting.model.ScriptEngineDescriptor.initParametersForJSR223Engine(ScriptEngineDescriptor.java:255) at org.openstreetmap.josm.plugins.scripting.model.ScriptEngineDescriptor.<init>(ScriptEngineDescriptor.java:361) at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source) at org.openstreetmap.josm.plugins.scripting.model.JSR223ScriptEngineProvider.loadScriptEngineFactories(JSR223ScriptEngineProvider.java:167) at org.openstreetmap.josm.plugins.scripting.model.JSR223ScriptEngineProvider.setScriptEngineJars(JSR223ScriptEngineProvider.java:280) at org.openstreetmap.josm.plugins.scripting.preferences.ScriptEngineJarTableModel.fireTableDataChanged(ScriptEngineJarTableModel.java:147) at org.openstreetmap.josm.plugins.scripting.preferences.ScriptEngineJarTableModel.restoreFromPreferences(ScriptEngineJarTableModel.java:102) at org.openstreetmap.josm.plugins.scripting.preferences.ScriptEnginesConfigurationPanel.<init>(ScriptEnginesConfigurationPanel.java:187) at org.openstreetmap.josm.plugins.scripting.preferences.PreferenceEditor.addGui(PreferenceEditor.java:39) at org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.stateChanged(PreferenceTabbedPane.java:662) at java.desktop/javax.swing.DefaultSingleSelectionModel.fireStateChanged(Unknown Source) at java.desktop/javax.swing.DefaultSingleSelectionModel.setSelectedIndex(Unknown Source) at java.desktop/javax.swing.JTabbedPane.setSelectedIndexImpl(Unknown Source) at java.desktop/javax.swing.JTabbedPane.setSelectedIndex(Unknown Source) at org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.selectTabBy(PreferenceTabbedPane.java:329) at org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.selectTabByPref(PreferenceTabbedPane.java:346) at org.openstreetmap.josm.gui.preferences.PreferenceDialog.selectPreviouslySelectedPreferences(PreferenceDialog.java:155) at org.openstreetmap.josm.actions.PreferencesAction.lambda$run$0(PreferencesAction.java:116) at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport.enter(Unknown Source) at java.desktop/java.awt.Dialog.show(Unknown Source) at java.desktop/java.awt.Component.show(Unknown Source) at java.desktop/java.awt.Component.setVisible(Unknown Source) at java.desktop/java.awt.Window.setVisible(Unknown Source) at java.desktop/java.awt.Dialog.setVisible(Unknown Source) at org.openstreetmap.josm.gui.preferences.PreferenceDialog.setVisible(PreferenceDialog.java:145) at org.openstreetmap.josm.actions.PreferencesAction.run(PreferencesAction.java:119) at org.openstreetmap.josm.actions.PreferencesAction.actionPerformed(PreferencesAction.java:104) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source) at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.desktop/java.awt.Component.processMouseEvent(Unknown Source) at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source) at java.desktop/java.awt.Component.processEvent(Unknown Source) at java.desktop/java.awt.Container.processEvent(Unknown Source) at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.graalvm.polyglot.Engine at java.base/java.net.URLClassLoader.findClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 88 more
Attachments (0)
Change History (5)
comment:1 by , 2 years ago
Component: | Core → Plugin scripting |
---|---|
Owner: | changed from | to
comment:2 by , 2 years ago
comment:3 by , 2 years ago
Summary: | Configuring scripting plugin → NoClassDefFoundError: org/graalvm/polyglot/Engine |
---|
follow-up: 5 comment:4 by , 2 years ago
Do you try to configure the GraalJS JSR-223 compliant script engine?
Can you explain what you do before the exception is thrown?
Can you please post the following preferences in your preferences.xml
?
<list key='scripting.engine-jars'> <entry value='/path/to/xy.jar'/> <entry value='/path/to/xy.jar'/> </list>
comment:5 by , 2 years ago
Replying to Gubaer:
Do you try to configure the GraalJS JSR-223 compliant script engine?
No, but how do I configure it?
Can you explain what you do before the exception is thrown?
First, I installed the scripting plugin through the following steps:
- Edit > Preferences > Plugins
- Look for scripting within the list and add it.
- After adding it, I tried to run the following block of code:
import josm from 'josm' import { buildAddCommand } from 'josm/command' import { NodeBuilder } from 'josm/builder' const layer = josm.layers.addDataLayer('Obstberg') const restaurant = NodeBuilder .withTags({amenity: 'restaurant'}) .withPosition(12.34,45.67) .create() buildAddCommand(restaurant) .applyTo(layer) josm.alert('Added restaurant Obstberg')
but it didn't work, so I did Scripting > Configure. This is where the exception was thrown.
Can you please post the following preferences in your
preferences.xml
?
I just đi
<list key='scripting.engine-jars'> <entry value='/path/to/xy.jar'/> <entry value='/path/to/xy.jar'/> </list>
Ticket #22506 has been marked as a duplicate of this ticket.