JDK-8167346 : NoClassDefFoundError thrown by ManagementFactory.getPlatformMBeanServer is back
  • Type: Bug
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • CPU: x86
  • Submitted: 2016-10-07
  • Updated: 2019-08-02
  • Resolved: 2016-10-07
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+138)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+138, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [version 10.0.14393]

A DESCRIPTION OF THE PROBLEM :
I am bitten by https://bugs.openjdk.java.net/browse/JDK-8140481 that was supposed to be fixed in b92.

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/management/internal/GarbageCollectorExtImpl
        at sun.management.MemoryImpl.getMemoryManagers0(java.management@9-ea/Native Method)
        at sun.management.MemoryImpl.getMemoryManagers(java.management@9-ea/MemoryImpl.java:98)
        at sun.management.ManagementFactoryHelper.getGarbageCollectorMXBeans(java.management@9-ea/ManagementFactoryHelper.java:144)
        at java.lang.management.DefaultPlatformMBeanProvider$4.nameToMBeanMap(java.management@9-ea/DefaultPlatformMBeanProvider.java:185)
        at java.lang.management.ManagementFactory.lambda$getPlatformMBeanServer$0(java.management@9-ea/ManagementFactory.java:478)
        at java.util.stream.ReferencePipeline$7$1.accept(java.base@9-ea/ReferencePipeline.java:269)
        at java.util.stream.ReferencePipeline$2$1.accept(java.base@9-ea/ReferencePipeline.java:177)
        at java.util.HashMap$ValueSpliterator.forEachRemaining(java.base@9-ea/HashMap.java:1672)
        at java.util.stream.AbstractPipeline.copyInto(java.base@9-ea/AbstractPipeline.java:484)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(java.base@9-ea/AbstractPipeline.java:474)
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(java.base@9-ea/ForEachOps.java:151)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(java.base@9-ea/ForEachOps.java:174)
        at java.util.stream.AbstractPipeline.evaluate(java.base@9-ea/AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.forEach(java.base@9-ea/ReferencePipeline.java:430)
        at java.lang.management.ManagementFactory.getPlatformMBeanServer(java.management@9-ea/ManagementFactory.java:479)
        at com.persistit.Persistit.unregisterMXBeans(Persistit.java:792)

REGRESSION.  Last worked in version 8u102


REPRODUCIBILITY :
This bug can be reproduced always.


Comments
Closing as duplicate of JDK-8151099
07-10-2016

This is not the same issue https://bugs.openjdk.java.net/browse/JDK-8140481 , it has been already fixed in 9 ea b-92. The issue you have reported is the duplicate of https://bugs.openjdk.java.net/browse/JDK-8151099 that is yet to be fixed.
07-10-2016