Modify

Opened 5 months ago

Closed 2 months ago

#21745 closed defect (needinfo)

IAE: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter (in unamed module) cannot access class sun.security.action.GetPropertyAction

Reported by: anonymous Owned by: anonymous
Priority: normal Milestone:
Component: Core Version: tested
Keywords: template_report unamed module linux EndeavourOS Cc:

Description

What steps will reproduce the problem?

  1. Go to presets -> relations -> boundary
  2. Enter data
  3. Click OK

What is the expected result?

Creates relation

What happens instead?

Doesn't create relation

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

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-01-02 21:24:43 +0100 (Sun, 02 Jan 2022)
Revision:18360
Build-Date:2022-01-02 20:26:19
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18360 en) Linux EndeavourOS Linux
Memory Usage: 554 MB / 2980 MB (282 MB allocated, but free)
Java version: 17.0.1+12, N/A, OpenJDK 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.utf8
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: X-Cinnamon
Dataset consistency test: No problems found

Plugins:
+ apache-commons (35893)
+ ejml (35893)
+ geotools (35893)
+ jaxb (35893)
+ jts (35893)
+ opendata (35893)
+ serbian (${version.entry.commit.revision})
+ utilsplugin2 (35893)

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Admin_Boundaries&zip=1

Last errors/warnings:
- 00047.402 E: Handled by bug report queue: java.lang.IllegalAccessError: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter (in unnamed module @0x7650ded6) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x7650ded6



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (21) of main
java.lang.IllegalAccessError: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter (in unnamed module @0x7650ded6) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x7650ded6
	at com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter.<clinit>(PNMImageWriter.java:111)
	at com.sun.media.imageioimpl.plugins.pnm.PNMImageWriterSpi.createWriterInstance(PNMImageWriterSpi.java:117)
	at java.desktop/javax.imageio.spi.ImageWriterSpi.createWriterInstance(ImageWriterSpi.java:351)
	at java.desktop/javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:851)
	at java.desktop/javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:835)
	at java.desktop/sun.awt.X11.XDataTransferer.getPlatformMappingsForFlavor(XDataTransferer.java:412)
	at java.desktop/sun.awt.datatransfer.DesktopDatatransferServiceImpl.getPlatformMappingsForFlavor(DesktopDatatransferServiceImpl.java:87)
	at java.datatransfer/java.awt.datatransfer.SystemFlavorMap.flavorToNativeLookup(SystemFlavorMap.java:447)
	at java.datatransfer/java.awt.datatransfer.SystemFlavorMap.getNativesForFlavor(SystemFlavorMap.java:561)
	at java.desktop/sun.awt.datatransfer.DataTransferer.getFlavorsForFormats(DataTransferer.java:458)
	at java.desktop/sun.awt.datatransfer.ClipboardTransferable.<init>(ClipboardTransferable.java:88)
	at java.desktop/sun.awt.X11.XClipboard.getContents(XClipboard.java:108)
	at org.openstreetmap.josm.gui.datatransfer.ClipboardUtils.getClipboardContent(ClipboardUtils.java:107)
	at org.openstreetmap.josm.gui.datatransfer.ClipboardUtils.getClipboardContent(ClipboardUtils.java:95)
	at org.openstreetmap.josm.gui.dialogs.relation.actions.PasteMembersAction.getSupport(PasteMembersAction.java:41)
	at org.openstreetmap.josm.gui.dialogs.relation.actions.PasteMembersAction.updateEnabledState(PasteMembersAction.java:48)
	at org.openstreetmap.josm.gui.dialogs.relation.actions.PasteMembersAction.<init>(PasteMembersAction.java:28)
	at org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor$3.<init>(GenericRelationEditor.java:307)
	at org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor.<init>(GenericRelationEditor.java:307)
	at org.openstreetmap.josm.gui.dialogs.relation.RelationEditor.getEditor(RelationEditor.java:83)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.lambda$showAndApply$8(TaggingPreset.java:539)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	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:741)
	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)

Attachments (0)

Change History (8)

comment:1 Changed 5 months ago by skyper

Keywords: unamed module linux EndeavourOS added
Summary: JOSM crashes when trying to create new relationIAE: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter (in unamed module) cannot access class sun.security.action.GetPropertyAction
Version: latesttested

Probably, duplicate of #21540

@anonymous:
How did you install JOSM? How are you running JOSM?

comment:2 Changed 5 months ago by skyper

Owner: changed from team to anonymous
Status: newneedinfo

comment:3 in reply to:  1 Changed 5 months ago by anonymous

How did you install JOSM?

Downloaded .jar file form josm website.

How are you running JOSM?

I ran it with java -jar command.

comment:4 Changed 5 months ago by skyper

Strange, I have never seen this exception on my Debian system. Does this depend on some java libraries which I have installed on my system?

According, to #21540, adding some args helps:
java --module-path /usr/share/openjfx/lib --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 -jar josm.jar

Does this work for you, too?

comment:5 in reply to:  description Changed 5 months ago by skyper

Replying to anonymous:

What steps will reproduce the problem?

  1. Go to presets -> relations -> boundary
  2. Enter data
  3. Click OK

What is the expected result?

Creates relation

What happens instead?

Doesn't create relation

Something is missing here as "Ok" is not available in the preset dialog. Only, "Apply Preset" or "New Relation" are available. The first is only available if a relation is selected.

Just tested with fresh preferences and simply using java -Djosm.home=/tmp/.josm_test -jar josm.jar and cannot reproduce:

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-01-02 21:24:43 +0100 (Sun, 02 Jan 2022)
Revision:18360
Build-Date:2022-01-02 20:26:19
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18360 en) Linux Debian GNU/Linux 11 (bullseye)
Java version: 17.0.1+12-Debian-1deb11u2, Debian, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Environment variable LANG: en_US.utf8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Desktop environment: GNOME
libcommons-compress-java: libcommons-compress-java:all-1.20-1
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:all-20201225-1
VM arguments: [-Djosm.home=<josm.pref>]
Dataset consistency test: No problems found

Last errors/warnings:
- 00526.472 W: Unsaved changes - <html>The relation has been changed.<br><br>Do you want to save your changes?</html>
- 00566.258 W: Unsaved changes - <html>The relation has been changed.<br><br>Do you want to save your changes?</html>
- 00696.404 W: Unsaved changes - <html>The relation has been changed.<br><br>Do you want to save your changes?</html>

comment:6 in reply to:  4 Changed 5 months ago by anonymous

Replying to skyper:

Strange, I have never seen this exception on my Debian system. Does this depend on some java libraries which I have installed on my system?

According, to #21540, adding some args helps:
java --module-path /usr/share/openjfx/lib --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 -jar josm.jar

Does this work for you, too?

No, It gives me an error.

$java --module-path /usr/share/openjfx/lib --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 -jar josm-tested.jar 
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.web not found

comment:7 Changed 5 months ago by skyper

Ok, our josm-latest.deb depends on openjfx which ships all the javafx stuff. Is the openjfx package installed on your system? Maybe the path is a bit different.

comment:8 Changed 2 months ago by taylor.smock

Resolution: needinfo
Status: needinfoclosed

We don't actually use JavaFX in JOSM core -- it is a dependency for some plugins (specifically Microsoft Streetside). So you can technically remove the javafx modules and the module path, if you really don't want to install OpenJFX. But you should probably just install OpenJFX.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anonymous.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.