Modify

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#11577 closed defect (othersoftware)

NoClassDefFoundError when JCS calls ManagementFactory.getPlatformMBeanServer (Java 9)

Reported by: ad.verburg@… Owned by: team
Priority: normal Milestone:
Component: Core imagery Version:
Keywords: template_report javabug java9 Cc:

Description

What steps will reproduce the problem?

  1. start josm-tested.jar (version 8491)
  2. click download

What is the expected result? get the map to select an area

What happens instead? error handling dialog

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

the josm.jnlp (version 8491) works fine

Revision: 8491
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: Don-vip
Last Changed Date: 2015-06-16 23:27:08 +0200 (Tue, 16 Jun 2015)
Build-Date: 2015-06-16 21:45:58
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8491

Identification: JOSM/1.5 (8491 nl) Linux openSUSE 20150612 (Tumbleweed) (x86_64)
Memory Usage: 395 MB / 3543 MB (329 MB allocated, but free)
Java version: 1.9.0_00, Oracle Corporation, OpenJDK 64-Bit Server VM

Plugins:
- turnlanes (31241)
- turnrestrictions (31241)
- undelete (31241)

Last errors/warnings:
- E: java.lang.NoClassDefFoundError: com/sun/management/internal/GarbageCollectorExtImpl

java.lang.NoClassDefFoundError: com/sun/management/internal/GarbageCollectorExtImpl
	at sun.management.MemoryImpl.getMemoryManagers0(Native Method)
	at sun.management.MemoryImpl.getMemoryManagers(MemoryImpl.java:98)
	at sun.management.ManagementFactoryHelper.getGarbageCollectorMXBeans(ManagementFactoryHelper.java:130)
	at java.lang.management.DefaultPlatformMBeanProvider$4.nameToMBeanMap(DefaultPlatformMBeanProvider.java:185)
	at java.lang.management.ManagementFactory.lambda$getPlatformMBeanServer$0(ManagementFactory.java:478)
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1664)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:505)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:495)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:479)
	at org.apache.commons.jcs.engine.control.CompositeCacheManager.initialize(CompositeCacheManager.java:262)
	at org.apache.commons.jcs.engine.control.CompositeCacheManager.getUnconfiguredInstance(CompositeCacheManager.java:214)
	at org.openstreetmap.josm.data.cache.JCSCacheManager.initialize(JCSCacheManager.java:103)
	at org.openstreetmap.josm.data.cache.JCSCacheManager.getCache(JCSCacheManager.java:147)
	at org.openstreetmap.josm.data.imagery.TMSCachedTileLoader.<init>(TMSCachedTileLoader.java:83)
	at org.openstreetmap.josm.gui.layer.TMSLayer$1.makeTileLoader(TMSLayer.java:165)
	at org.openstreetmap.josm.gui.bbox.SlippyMapBBoxChooser.<init>(SlippyMapBBoxChooser.java:141)
	at org.openstreetmap.josm.gui.download.SlippyMapChooser.<init>(SlippyMapChooser.java:34)
	at org.openstreetmap.josm.gui.download.DownloadDialog.buildMainPanel(DownloadDialog.java:122)
	at org.openstreetmap.josm.gui.download.DownloadDialog.<init>(DownloadDialog.java:221)
	at org.openstreetmap.josm.gui.download.DownloadDialog.getInstance(DownloadDialog.java:66)
	at org.openstreetmap.josm.actions.DownloadAction.actionPerformed(DownloadAction.java:41)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2026)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2366)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:261)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:266)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.awt.Component.processMouseEvent(Component.java:6584)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3349)
	at java.awt.Component.processEvent(Component.java:6349)
	at java.awt.Container.processEvent(Container.java:2258)
	at java.awt.Component.dispatchEventImpl(Component.java:4968)
	at java.awt.Container.dispatchEventImpl(Container.java:2316)
	at java.awt.Component.dispatchEvent(Component.java:4800)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4908)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4545)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4473)
	at java.awt.Container.dispatchEventImpl(Container.java:2302)
	at java.awt.Window.dispatchEventImpl(Window.java:2756)
	at java.awt.Component.dispatchEvent(Component.java:4800)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:761)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:712)
	at java.awt.EventQueue$3.run(EventQueue.java:706)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:734)
	at java.awt.EventQueue$4.run(EventQueue.java:732)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:731)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:192)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:106)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:102)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:94)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:83)

Attachments (0)

Change History (9)

comment:1 by wiktorn, 10 years ago

I see that you use Java version 9. Do you use the same version of JRE, when starting from JNLP? It looks like some JDK 9 problem

comment:2 by AdVerburg, 10 years ago

Using an older JRE (from the commandline):
/home/ad/opt/jdk1.7.0_25/bin/java -jar josm-tested.jar <-- goes well.
So this is a JRE problem, and can avoided by using an older JRE, or JDK.

comment:3 by Don-vip, 10 years ago

Keywords: javabug java9 opensuse linux added
Resolution: othersoftware
Status: newclosed
Summary: No downloadNoClassDefFoundError with Java 9 / OpenSUSE

Java 9 is not released yet, please file a bug report to OpenSUSE.

comment:4 by wiktorn, 10 years ago

Keywords: windows added

I can confirm the same bug for JDK 9 Build b68 for Windows (Java version: 1.9.0-ea, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM).

@Don-vip:
Do we need to report it to Oracle, or have you tested with fresh openjdk built from source, and this problem do not exists there?

comment:5 by Don-vip, 9 years ago

Ticket #11892 has been marked as a duplicate of this ticket.

in reply to:  4 comment:6 by Don-vip, 9 years ago

Component: CoreCore imagery
Keywords: opensuse linux windows removed
Summary: NoClassDefFoundError with Java 9 / OpenSUSENoClassDefFoundError when JCS calls ManagementFactory.getPlatformMBeanServer (Java 9)

Replying to wiktorn:

I can confirm the same bug for JDK 9 Build b68 for Windows

I cannot reproduce with b82. I found that someone had the same bug with b78 so this bug might have been fixed in the meanwhile.

@Don-vip:
Do we need to report it to Oracle?

From now, yes (if reproduced with b82+). I have added basic Java 9 compatibility and JOSM is now officialy listed in OpenJDK Quality Outreach projects.

Last edited 9 years ago by Don-vip (previous) (diff)

comment:7 by wiktorn, 9 years ago

I've just checked with:

java version "1.9.0-ea"
Java(TM) SE Runtime Environment (build 1.9.0-ea-b82)
Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b82, mixed mode)
Revision: 8800
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: simon04
Last Changed Date: 2015-09-27 22:11:06 +0200 (Sun, 27 Sep 2015)
Build-Date: 2015-09-28 01:32:03
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8800

Identification: JOSM/1.5 (8800 en) Windows 7 64-Bit
Memory Usage: 384 MB / 3068 MB (301 MB allocated, but free)
Java version: 1.9.0-ea, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM

Plugins:
- commons-imaging (31241)
- jts (31126)
- opendata
- photo_geotagging (31241)
- reverter (31596)
- utilsplugin2 (31463)

Last errors/warnings:
- W: Cannot start IPv4 remotecontrol server on port 8111: Address already in use: NET_Bind
- W: Cannot start IPv6 remotecontrol server on port 8111: Address already in use: NET_Bind
- W: Cannot lock cache directory. Will not use disk cache
- E: java.lang.NoClassDefFoundError: com/sun/management/internal/GarbageCollectorExtImpl

java.lang.NoClassDefFoundError: com/sun/management/internal/GarbageCollectorExtImpl
	at sun.management.MemoryImpl.getMemoryManagers0(Native Method)
	at sun.management.MemoryImpl.getMemoryManagers(MemoryImpl.java:98)
	at sun.management.ManagementFactoryHelper.getGarbageCollectorMXBeans(ManagementFactoryHelper.java:130)
	at java.lang.management.DefaultPlatformMBeanProvider$4.nameToMBeanMap(DefaultPlatformMBeanProvider.java:185)
	at java.lang.management.ManagementFactory.lambda$getPlatformMBeanServer$0(ManagementFactory.java:478)
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:269)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
	at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1664)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430)
	at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:479)
	at org.apache.commons.jcs.engine.control.CompositeCacheManager.initialize(CompositeCacheManager.java:262)
	at org.apache.commons.jcs.engine.control.CompositeCacheManager.getUnconfiguredInstance(CompositeCacheManager.java:214)
	at org.openstreetmap.josm.data.cache.JCSCacheManager.initialize(JCSCacheManager.java:117)
	at org.openstreetmap.josm.data.cache.JCSCacheManager.getCache(JCSCacheManager.java:148)
	at org.openstreetmap.josm.gui.layer.AbstractCachedTileSourceLayer.getCache(AbstractCachedTileSourceLayer.java:122)
	at org.openstreetmap.josm.gui.layer.AbstractCachedTileSourceLayer.getTileLoaderFactory(AbstractCachedTileSourceLayer.java:113)
	at org.openstreetmap.josm.gui.bbox.SlippyMapBBoxChooser.<init>(SlippyMapBBoxChooser.java:143)
	at org.openstreetmap.josm.gui.download.SlippyMapChooser.<init>(SlippyMapChooser.java:34)
	at org.openstreetmap.josm.gui.download.DownloadDialog.buildMainPanel(DownloadDialog.java:122)
	at org.openstreetmap.josm.gui.download.DownloadDialog.<init>(DownloadDialog.java:234)
	at org.openstreetmap.josm.gui.download.DownloadDialog.<init>(DownloadDialog.java:222)
	at org.openstreetmap.josm.gui.download.DownloadDialog.getInstance(DownloadDialog.java:66)
	at org.openstreetmap.josm.actions.DownloadAction.actionPerformed(DownloadAction.java:43)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2026)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2366)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:261)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:266)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.awt.Component.processMouseEvent(Component.java:6607)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3361)
	at java.awt.Component.processEvent(Component.java:6372)
	at java.awt.Container.processEvent(Container.java:2259)
	at java.awt.Component.dispatchEventImpl(Component.java:4991)
	at java.awt.Container.dispatchEventImpl(Container.java:2317)
	at java.awt.Component.dispatchEvent(Component.java:4823)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4906)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4543)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4484)
	at java.awt.Container.dispatchEventImpl(Container.java:2303)
	at java.awt.Window.dispatchEventImpl(Window.java:2759)
	at java.awt.Component.dispatchEvent(Component.java:4823)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:761)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:712)
	at java.awt.EventQueue$3.run(EventQueue.java:706)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:734)
	at java.awt.EventQueue$4.run(EventQueue.java:732)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:731)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:192)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:106)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:102)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:94)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:83)

Interesting is, that the exception occurs only on first invocation (in our case - when we try to open slippy map for download). Further invocations do not have this error.

comment:8 by Don-vip, 9 years ago

Strange I still don't reproduce it... But reported anyway to https://bugs.openjdk.java.net/browse/JI-9025322 (link accessible in a few days)

comment:9 by Don-vip, 9 years ago

The bug has just been fixed upstream thanks to our bug report :)
http://hg.openjdk.java.net/jdk9/dev/rev/05228b00bfcf

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.