java.lang.NoClassDefFoundError: sun.management.ManagementFactory

Terracotta Project Issue Tracker | Li Ma | 7 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    Run dev-console against one server with two clients, which has Hibernate+EHCache and Session clustering in Express mode, got the following exceptions in dev-console's terminal console: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at org.terracotta.modules.ehcache.presentation.EhcacheRuntimeStatsPanel.setSelectedCacheModel(EhcacheRuntimeStatsPanel.java:216) at org.terracotta.modules.ehcache.presentation.CacheManagerPanel.propertyChange(CacheManagerPanel.java:71) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) at java.awt.Component.firePropertyChange(Component.java:8213) at org.terracotta.modules.ehcache.presentation.EhcacheConfigPanel.valueChanged(EhcacheConfigPanel.java:100) at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167) at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:147) at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:194) at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:388) at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:398) at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:442) at javax.swing.JTable.setRowSelectionInterval(JTable.java:2128) at com.tc.admin.common.XTable.setSelectedRows(XTable.java:271) at com.tc.admin.common.XTable.setSelectedRow(XTable.java:277) at org.terracotta.modules.ehcache.presentation.EhcacheConfigPanel$CacheTableModelGetter.finished(EhcacheConfigPanel.java:221) at com.tc.admin.common.BasicWorker$1.run(BasicWorker.java:59) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:633) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: No such child: 1 at java.awt.Container.getComponent(Container.java:294) at org.terracotta.modules.ehcache.presentation.EhcachePresentationPanel$2.run(EhcachePresentationPanel.java:221) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:633) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at org.terracotta.modules.ehcache.presentation.BaseEhcacheStatsChartPanel.setup(BaseEhcacheStatsChartPanel.java:96) at org.terracotta.modules.ehcache.presentation.ClientEhcacheStatsChartPanel.setup(ClientEhcacheStatsChartPanel.java:28) at org.terracotta.modules.ehcache.presentation.EhcacheRuntimeStatsPanel.createClientEhcacheStatsChartPanel(EhcacheRuntimeStatsPanel.java:266) at org.terracotta.modules.ehcache.presentation.EhcacheRuntimeStatsPanel.access$200(EhcacheRuntimeStatsPanel.java:41) at org.terracotta.modules.ehcache.presentation.EhcacheRuntimeStatsPanel$1.run(EhcacheRuntimeStatsPanel.java:161) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:633) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: sun.management.ManagementFactory at com.tc.management.L1Info.isVerboseGC(L1Info.java:259) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:105) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:39) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:220) at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:77) at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:228) at javax.management.StandardMBean.getAttribute(StandardMBean.java:370) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:678) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:650) at javax.management.remote.generic.ServerIntermediary.handleRequest(ServerIntermediary.java:222) at javax.management.remote.generic.ServerIntermediary$PrivilegedRequestJob.run(ServerIntermediary.java:951) at java.security.AccessController.doPrivileged(AccessController.java:284) at javax.management.remote.generic.ServerIntermediary$RequestHandler.handleMBSReqMessage(ServerIntermediary.java:727) at javax.management.remote.generic.ServerIntermediary$RequestHandler.execute(ServerIntermediary.java:629) at com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl$RemoteJob.run(ServerSynchroMessageConnectionImpl.java:266) at com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(ThreadService.java:208) at com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59) Caused by: java.lang.ClassNotFoundException: sun.management.ManagementFactory at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:77) at java.net.URLClassLoader.findClass(URLClassLoader.java:383) at org.terracotta.session.L1Loader.findClass(L1Loader.java:25) at java.lang.ClassLoader.loadClass(ClassLoader.java:652) at java.lang.ClassLoader.loadClass(ClassLoader.java:618) ... 21 more Dev-console seams to be throwing more exceptions than earlier versions. Really need to have more robust code in dev-console to be tolerable to exceptions like these.

    Terracotta Project Issue Tracker | 7 years ago | Li Ma
    java.lang.NoClassDefFoundError: sun.management.ManagementFactory
  2. 0

    Run dev-console against one server with two clients, which has Hibernate+EHCache and Session clustering in Express mode, got the following exceptions in dev-console's terminal console: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at org.terracotta.modules.ehcache.presentation.EhcacheRuntimeStatsPanel.setSelectedCacheModel(EhcacheRuntimeStatsPanel.java:216) at org.terracotta.modules.ehcache.presentation.CacheManagerPanel.propertyChange(CacheManagerPanel.java:71) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) at java.awt.Component.firePropertyChange(Component.java:8213) at org.terracotta.modules.ehcache.presentation.EhcacheConfigPanel.valueChanged(EhcacheConfigPanel.java:100) at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167) at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:147) at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:194) at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:388) at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:398) at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:442) at javax.swing.JTable.setRowSelectionInterval(JTable.java:2128) at com.tc.admin.common.XTable.setSelectedRows(XTable.java:271) at com.tc.admin.common.XTable.setSelectedRow(XTable.java:277) at org.terracotta.modules.ehcache.presentation.EhcacheConfigPanel$CacheTableModelGetter.finished(EhcacheConfigPanel.java:221) at com.tc.admin.common.BasicWorker$1.run(BasicWorker.java:59) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:633) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: No such child: 1 at java.awt.Container.getComponent(Container.java:294) at org.terracotta.modules.ehcache.presentation.EhcachePresentationPanel$2.run(EhcachePresentationPanel.java:221) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:633) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at org.terracotta.modules.ehcache.presentation.BaseEhcacheStatsChartPanel.setup(BaseEhcacheStatsChartPanel.java:96) at org.terracotta.modules.ehcache.presentation.ClientEhcacheStatsChartPanel.setup(ClientEhcacheStatsChartPanel.java:28) at org.terracotta.modules.ehcache.presentation.EhcacheRuntimeStatsPanel.createClientEhcacheStatsChartPanel(EhcacheRuntimeStatsPanel.java:266) at org.terracotta.modules.ehcache.presentation.EhcacheRuntimeStatsPanel.access$200(EhcacheRuntimeStatsPanel.java:41) at org.terracotta.modules.ehcache.presentation.EhcacheRuntimeStatsPanel$1.run(EhcacheRuntimeStatsPanel.java:161) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:633) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: sun.management.ManagementFactory at com.tc.management.L1Info.isVerboseGC(L1Info.java:259) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:105) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:39) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:220) at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:77) at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:228) at javax.management.StandardMBean.getAttribute(StandardMBean.java:370) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:678) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:650) at javax.management.remote.generic.ServerIntermediary.handleRequest(ServerIntermediary.java:222) at javax.management.remote.generic.ServerIntermediary$PrivilegedRequestJob.run(ServerIntermediary.java:951) at java.security.AccessController.doPrivileged(AccessController.java:284) at javax.management.remote.generic.ServerIntermediary$RequestHandler.handleMBSReqMessage(ServerIntermediary.java:727) at javax.management.remote.generic.ServerIntermediary$RequestHandler.execute(ServerIntermediary.java:629) at com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl$RemoteJob.run(ServerSynchroMessageConnectionImpl.java:266) at com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(ThreadService.java:208) at com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59) Caused by: java.lang.ClassNotFoundException: sun.management.ManagementFactory at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:77) at java.net.URLClassLoader.findClass(URLClassLoader.java:383) at org.terracotta.session.L1Loader.findClass(L1Loader.java:25) at java.lang.ClassLoader.loadClass(ClassLoader.java:652) at java.lang.ClassLoader.loadClass(ClassLoader.java:618) ... 21 more Dev-console seams to be throwing more exceptions than earlier versions. Really need to have more robust code in dev-console to be tolerable to exceptions like these.

    Terracotta Project Issue Tracker | 7 years ago | Li Ma
    java.lang.NoClassDefFoundError: sun.management.ManagementFactory
  3. 0
    samebug tip
    jsp-api and servlet-api jars must NOT be deployed by your web app. They should be marked as provided but not deployed by your app.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    error in lein repl (need help debugging jvm stacktrace)

    Stack Overflow | 4 years ago | murtaza52
    java.lang.ClassNotFoundException: org.mortbay.log.Logger
  6. 0

    java.lang.NoClassDefFoundError when using twitter hosebird

    Stack Overflow | 2 years ago | user3288346
    java.lang.ClassNotFoundException: org.apache.http.client.methods.HttpUriRequest
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    sun.management.ManagementFactory

    at java.lang.ClassNotFoundException.<init>()
  2. Java RT
    URLClassLoader.findClass
    1. java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:77)
    2. java.net.URLClassLoader.findClass(URLClassLoader.java:383)
    2 frames
  3. org.terracotta.session
    L1Loader.findClass
    1. org.terracotta.session.L1Loader.findClass(L1Loader.java:25)
    1 frame
  4. Java RT
    ClassLoader.loadClass
    1. java.lang.ClassLoader.loadClass(ClassLoader.java:652)
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:618)
    2 frames
  5. com.tc.management
    L1Info.isVerboseGC
    1. com.tc.management.L1Info.isVerboseGC(L1Info.java:259)
    1 frame
  6. Java RT
    JmxMBeanServer.getAttribute
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    4. java.lang.reflect.Method.invoke(Method.java:600)
    5. com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:105)
    6. com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:39)
    7. com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:220)
    8. com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:77)
    9. com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:228)
    10. javax.management.StandardMBean.getAttribute(StandardMBean.java:370)
    11. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:678)
    12. com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:650)
    12 frames
  7. JMX Remote
    ServerIntermediary$PrivilegedRequestJob.run
    1. javax.management.remote.generic.ServerIntermediary.handleRequest(ServerIntermediary.java:222)
    2. javax.management.remote.generic.ServerIntermediary$PrivilegedRequestJob.run(ServerIntermediary.java:951)
    2 frames
  8. Java RT
    AccessController.doPrivileged
    1. java.security.AccessController.doPrivileged(AccessController.java:284)
    1 frame
  9. JMX Remote
    JobExecutor.run
    1. javax.management.remote.generic.ServerIntermediary$RequestHandler.handleMBSReqMessage(ServerIntermediary.java:727)
    2. javax.management.remote.generic.ServerIntermediary$RequestHandler.execute(ServerIntermediary.java:629)
    3. com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl$RemoteJob.run(ServerSynchroMessageConnectionImpl.java:266)
    4. com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(ThreadService.java:208)
    5. com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59)
    5 frames