#22143 closed defect (invalid)
Error at launching
| Reported by: | anonymous | Owned by: | anonymous |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
What is the expected result?
What happens instead?
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-05-29 21:53:52 +0200 (Sun, 29 May 2022) Revision:18463 Build-Date:2022-05-30 01:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18463 pt_BR) Linux Ubuntu 20.04.4 LTS Memory Usage: 594 MB / 3928 MB (252 MB allocated, but free) Java version: 17.0.1+12-LTS-39, 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: pt_BR.UTF-8 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: pt_BR Numbers with default locale: 1234567890 -> 1234567890 Desktop environment: ubuntu:GNOME fonts-noto: fonts-noto:- Plugins: + KartaView (387) + Mapillary (2.0.0-beta.10) + apache-commons (35924) + apache-http (35924) + contourmerge (v0.1.9) + dataimport (35932) + ejml (35924) + geotools (35959) + jackson (35958) + jaxb (35952) + jna (35924) + jts (35924) + measurement (35893) + opendata (35910) + pdfimport (35893) + poly (35893) + utilsplugin2 (35970) Last errors/warnings: - 00009.756 E: Handled by bug report queue: java.lang.IllegalAccessError: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter (in unnamed module @0x6573d2f7) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x6573d2f7 - 00016.996 E: Handled by bug report queue: java.lang.NoClassDefFoundError: Could not initialize class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (22) of main java.lang.NoClassDefFoundError: Could not initialize class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter 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.datatransfer.ClipboardUtils.getClipboardStringContent(ClipboardUtils.java:80) at org.openstreetmap.josm.gui.widgets.AbstractIdTextField.tryToPasteFromClipboard(AbstractIdTextField.java:75) at org.openstreetmap.josm.gui.dialogs.changeset.SingleChangesetDownloadPanel.build(SingleChangesetDownloadPanel.java:64) at org.openstreetmap.josm.gui.dialogs.changeset.SingleChangesetDownloadPanel.<init>(SingleChangesetDownloadPanel.java:40) at org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager.buildToolbarPanel(ChangesetCacheManager.java:143) at org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager.build(ChangesetCacheManager.java:315) at org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager.<init>(ChangesetCacheManager.java:333) at org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager.getInstance(ChangesetCacheManager.java:93) at org.openstreetmap.josm.gui.download.BookmarkList.load(BookmarkList.java:289) at org.openstreetmap.josm.gui.download.BookmarkList.<init>(BookmarkList.java:245) at org.openstreetmap.josm.gui.download.BookmarkSelection.addGui(BookmarkSelection.java:117) at org.openstreetmap.josm.gui.download.DownloadDialog.buildMainPanel(DownloadDialog.java:162) at org.openstreetmap.josm.gui.download.DownloadDialog.<init>(DownloadDialog.java:263) at org.openstreetmap.josm.gui.download.DownloadDialog.<init>(DownloadDialog.java:251) at org.openstreetmap.josm.gui.download.DownloadDialog.getInstance(DownloadDialog.java:92) at org.openstreetmap.josm.actions.DownloadAction.actionPerformed(DownloadAction.java:40) 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.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389) at java.desktop/java.awt.Component.processEvent(Component.java:6391) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833) 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:4833) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) 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.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744) 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:743) 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 (9)
comment:1 by , 4 years ago
| Summary: | Erro ao iniciar o JOSM → Error at launching |
|---|
comment:2 by , 4 years ago
comment:3 by , 4 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → needinfo |
comment:4 by , 4 years ago
Hi,
I've been using JOSM for years launched from Gnome bar and the desktop script was the one below:
[Desktop Entry]
Type=Application
Version=1.0
Name=My JOSM
GenericName=Java OpenStreetMap Editor
Comment=Extensible off-line editor for OpenStreetMap (OSM)
Icon=org-openstreetmap-josm-main.png
Path=/home/fidelis/fontes/josm
Exec=java -jar josm-tested.jar %F
Terminal=false
MimeType=application/x-osm+xml;application/x-gpx+xml;x-scheme-handler/geo;
StartupNotify=true
Categories=Education;Geoscience;Maps;
StartupWMClass=org-openstreetmap-josm-Main
Keywords=OpenStreetMap;OSM;
Every time I download a new JOSM version I just change the link "josm-tested.jar" to point to the new version. It always worked fine until version 18463.
Now, I edited the .desktop script to add your suggested startup options to the Exec line and it worked!
Many Thanks!
comment:5 by , 4 years ago
| Resolution: | → invalid |
|---|---|
| Status: | needinfo → closed |
I'm glad to hear that you found a workaround. With that said, we highly recommend using the Ubuntu packages if at all possible. Otherwise, we do have a snap and there is an unofficial flatpak available.
If you cannot use the Ubuntu packages, you may want to look at updating your .desktop file. See source:trunk/native/linux/tested/usr/share/applications/org.openstreetmap.josm.desktop (specifically StartupWMClass).
follow-up: 7 comment:6 by , 4 years ago
I've followed your suggestion and installed the Ubundu package.
Thanks again.
comment:7 by , 4 years ago
Replying to fidelis.assis@…:
I've followed your suggestion and installed the Ubundu package.
Thanks again.
Does it correctly pass all options?
I currently have problems with it, see #22157.
comment:8 by , 4 years ago
Yes, I've checked the command line and all 3 optinsn you've mentioned are there:
/usr/lib/jvm/java-17-oracle/bin/java
--module-path /usr/share/openjfx/lib
--add-modules java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web
-Djosm.restart=true -Djava.net.useSystemProxies=true
--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
comment:9 by , 4 years ago
@skyper:
It is probably working properly because it found /usr/lib/jvm/java-17-oracle/bin/java. The code prior to r18497 used elif [[ "${JAVACMD}" =~ 'java-1' ]], which would see the java-17-oracle and continue to add the appropriate arguments. I believe your initial problem was that #!/bin/bash was not keeping environment variables, thus unsetting the JAVA_HOME variable (so /bin/java), which then caused some cascading failures which are fixed in r18497.



From comment:1:ticket:22110 (skyper)
How do you download/install JOSM?
How do you start JOSM?
Seems, you are missing some options on startup: --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
On Ubuntu, I suggest to use our Ubuntu packages which ship a proper startup script with the needed options.