#21059 closed defect (fixed)
JDK16 - IllegalAccessError: cannot access class [...] because module java.base does not export sun.security.action to unnamed module
Reported by: | kennykb | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | 21.10 |
Component: | Core | Version: | |
Keywords: | template_report java16 java17 | Cc: |
Description
What steps will reproduce the problem?
Crash came 'out of the blue' - my last GUI action was to double-click on the route relation to which way 618324884 belongs.
What is the expected result?
Uhm, open the relation editor.
What happens instead?
Crash.
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-06-02 22:03:39 +0200 (Wed, 02 Jun 2021) Revision:17919 Build-Date:2021-06-02 20:11:30 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (17919 en) Linux Ubuntu 20.04.2 LTS Memory Usage: 3572 MB / 24576 MB (1150 MB allocated, but free) Java version: 16.0.1+9-24, Oracle Corporation, OpenJDK 64-Bit Server VM Look and Feel: com.formdev.flatlaf.FlatDarkLaf Screen: :0.0 3840×2160 (scaling 1.00×1.00) Maximum Screen Size: 3840×2160 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: XFCE Java ATK Wrapper package: libatk-wrapper-java:all-0.37.1-1 libcommons-compress-java: libcommons-compress-java:all-1.19-1 libcommons-logging-java: libcommons-logging-java:all-1.2-2 fonts-noto: fonts-noto:- VM arguments: [-Dsun.java2d.uiScale=1] Dataset consistency test: No problems found Plugins: + ImportImagePlugin (35567) + OpeningHoursEditor (35640) + PicLayer (1.0.1) + PolygonCutOut (v0.7) + apache-commons (35524) + buildings_tools (35756) + ejml (35458) + flatlaf (35734) + geotools (35458) + jaxb (35543) + jts (35458) + log4j (35458) + opendata (35640) + pbf (35720) + reverter (35732) + todo (30306) + utilsplugin2 (35691) + wikipedia (1.1.4) Tagging presets: + ${HOME}/josm/stateParkPreset.xml Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/TigerReviewedNo&zip=1 Last errors/warnings: - 04978.898 E: Failed to locate image 'peak' - 04978.898 E: Failed to locate image 'peak' - 04978.898 E: Failed to locate image 'peak' - 04978.899 E: Failed to locate image 'peak' - 04978.899 E: Failed to locate image 'peak' - 04978.899 E: Failed to locate image 'peak' - 04978.899 E: Failed to locate image 'peak' - 04978.899 E: Failed to locate image 'peak' - 04978.899 E: Failed to locate image 'peak' - 15988.137 E: Handled by bug report queue: java.lang.IllegalAccessError: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter (in unnamed module @0x6fbf5db2) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x6fbf5db2 === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (22) of main java.lang.IllegalAccessError: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter (in unnamed module @0x6fbf5db2) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x6fbf5db2 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:849) at java.desktop/javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:833) 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:446) at java.datatransfer/java.awt.datatransfer.SystemFlavorMap.getNativesForFlavor(SystemFlavorMap.java:560) 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.dialogs.properties.PropertiesDialog.editMembership(PropertiesDialog.java:568) at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog.access$1300(PropertiesDialog.java:140) at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog$MouseClickWatch.mouseClicked(PropertiesDialog.java:1000) at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6620) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342) at java.desktop/java.awt.Component.processEvent(Component.java:6382) at java.desktop/java.awt.Container.processEvent(Container.java:2264) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4572) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) 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 (45)
comment:1 by , 3 years ago
Component: | Core → Plugin |
---|
comment:2 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:3 by , 3 years ago
Crash happened in PasteMembersAction which calls getClipboardContent(). I guess the clipboard contained something that cannot be interpreted as a relation member.
comment:4 by , 3 years ago
Component: | Plugin → Core |
---|---|
Keywords: | java16 added |
Milestone: | → 21.06 |
Owner: | changed from | to
Status: | needinfo → assigned |
Summary: | java.lang.IllegalAccessError: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter → JDK16 - IllegalAccessError: cannot access class [...] because module java.base does not export sun.security.action to unnamed module |
Java 16 hardened the security, so new bugs previously silently ignored are being revealed.
Looks like we need to add a new export:
module java.base does not export sun.security.action to unnamed module
comment:6 by , 3 years ago
Got this in 18182/josm with openjdk17:
What steps will reproduce the problem?
- start (with plugins active)
- error
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-08-26 16:42:55 +0200 (Thu, 26 Aug 2021) Revision:18182 Build-Date:2021-08-27 01:31:01 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18182 en) Linux Debian GNU/Linux bullseye/sid Memory Usage: 312 MB / 7992 MB (97 MB allocated, but free) Java version: 17-ea+24-Debian-1, Debian, OpenJDK 64-Bit Server VM Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel Screen: :0.0 7680×2160 (scaling 2.00×2.00) :0.1 1920×1080 (scaling 2.00×2.00) Maximum Screen Size: 7680×2160 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: XFCE Java ATK Wrapper package: libatk-wrapper-java:all-0.38.0-2 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 liboauth-signpost-java: liboauth-signpost-java:all-1.2.1.2-3 Plugins: + AddrInterpolation (35640) + DirectUpload (35640) + FixAddresses (35640) + HouseNumberTaggingTool (35640) + ImproveOsm (211) + InfoMode (35543) + Mapillary (2.0.0-alpha.32-dirty) + OpeningHoursEditor (35640) + PicLayer (1.0.1) + RoadSigns (35640) + alignways (35753) + apache-commons (35524) + apache-http (35589) + buildings_tools (35756) + conflation (0.6.6) + contourmerge (v0.1.8) + ejml (35458) + ext_tools (35640) + fieldpapers (v0.5.0) + geochat (35640) + geotools (35458) + gpsblam (35458) + graphview (35640) + gson (35458) + imagery_offset_db (35640) + jaxb (35543) + jna (35662) + jts (35458) + log4j (35458) + mapdust (35543) + measurement (35640) + merge-overlap (35640) + opendata (35803) + pbf (35720) + photo_geotagging (35783) + reltoolbox (35640) + reverter (35732) + routing (35640) + scripting (30798) + tageditor (35640) + turnlanes (35812) + turnlanes-tagging (288) + turnrestrictions (35640) + undelete (35640) + utilsplugin2 (35792) + waypoint_search (35562) Last errors/warnings: - 00008.412 W: Not a single layer for the name 'Bing Sat': [] - 00008.413 W: Not a single layer for the name 'Bing Sat': [] - 00008.761 W: Failed to load Mappaint styles from 'http://kolesar.turistautak.hu/osm/styles/measurements.mapcss'. Exception was: java.io.IOException: The requested URL http://kolesar.turistautak.hu/osm/styles/measurements.mapcss was not found - 00008.761 E: java.io.IOException: The requested URL http://kolesar.turistautak.hu/osm/styles/measurements.mapcss was not found - 00008.761 W: Failed to load Mappaint styles from '<josm.pref>/ebdirigo/style.zip'. Exception was: java.nio.file.NoSuchFileException: <josm.pref>/ebdirigo/style.zip - 00008.761 E: java.nio.file.NoSuchFileException: <josm.pref>/ebdirigo/style.zip - 00009.485 E: Failed to locate image 'traffic_signs/HU/HU_C-031.png.png' - 00009.486 W: No overtaking: Could not get presets icon traffic_signs/HU/HU_C-031.png.png - 00011.420 W: Warning: Failed to scan file 'site-svn.openstreetmap.org-_applications_editors_josm_plugins_opendata_modules.txt' for module information. Skipping. - 00015.265 E: Handled by bug report queue: java.lang.IllegalAccessError: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter (in unnamed module @0x7d986d83) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x7d986d83 === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (22) of main java.lang.IllegalAccessError: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter (in unnamed module @0x7d986d83) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x7d986d83 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:849) at java.desktop/javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:833) 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:446) at java.datatransfer/java.awt.datatransfer.SystemFlavorMap.getNativesForFlavor(SystemFlavorMap.java:560) 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:73) 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:142) at org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager.build(ChangesetCacheManager.java:312) at org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager.<init>(ChangesetCacheManager.java:330) 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:116) 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:6619) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389) at java.desktop/java.awt.Component.processEvent(Component.java:6384) at java.desktop/java.awt.Container.processEvent(Container.java:2267) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4995) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2325) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4827) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4946) 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:2311) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2775) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4827) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) 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)
comment:8 by , 3 years ago
Milestone: | 21.06 → 21.10 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
comment:10 by , 3 years ago
From JEP 261:
Two new JDK-specific JAR-file manifest attributes are defined to correspond to the --add-exports and --add-opens command-line options:
Add-Exports: <module>/<package>( <module>/<package>)* Add-Opens: <module>/<package>( <module>/<package>)*The value of each attribute is a space-separated list of slash-separated module-name/package-name pairs. A <module>/<package> pair in the value of an Add-Exports attribute has the same meaning as the command-line option --add-exports <module>/<package>=ALL-UNNAMED. A <module>/<package> pair in the value of an Add-Opens attribute has the same meaning as the command-line option --add-opens <module>/<package>=ALL-UNNAMED.
Each attribute can occur at most once, in the main section of a MANIFEST.MF file. A particular pair can be listed more than once. If a specified module was not resolved, or if a specified package does not exist, then the corresponding pair is ignored. These attributes are interpreted only in the main executable JAR file of an application, i.e., in the JAR file specified to the -jar option of the Java run-time launcher; they are ignored in all other JAR files.
So it does only work for JOSM code ><
comment:11 by , 3 years ago
Keywords: | java17 added |
---|
Replying to kevin.b.kenny@…:
Seems to be a problem with a plugin for images. Which plugin is using the class?
Please, try to update all your plugins, and maybe deactivate all and then activate them again, one by one.