Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8146186

NoClassDefFoundError when getting platform MBean server under webstart

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      java version "1.9.0-ea"
      Java(TM) SE Runtime Environment (build 1.9.0-ea-b78)
      Java HotSpot(TM) Client VM (build 1.9.0-ea-b78, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      I have a small webstart app which relies on the platform MBean server. The code to load this now fails under webstart with JDK 1.9, although not when run as a Java app from a jar file with java -jar

      REGRESSION. Last worked in version 8u60

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.9.0-ea"
      Java(TM) SE Runtime Environment (build 1.9.0-ea-b78)
      Java HotSpot(TM) Client VM (build 1.9.0-ea-b78, mixed mode)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Compile the given source code
      2. Make and sign a jar file and deploy as webstart app
      3. Run the corresponding JNLP file

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The application should terminate normally
      ACTUAL -
      The application does not launch correctly

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      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 Test.main(Test.java:3)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:504)
      at com.sun.javaws.Launcher.executeApplication(Unknown Source)
      at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
      at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:746)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.lang.management.*;
      import javax.management.*;

      public class Test {
        public static void main(String... argv) throws Exception {
          final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer ();
          System.out.println(System.getProperty("user.home"));
        }
      }
      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                almatvee Alexander Matveev
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: