java.lang.ClassCastException: com.sun.management.OperatingSystem cannot be cast to com.sun.management.UnixOperatingSystemMXBean

Atlassian JIRA | Wannes Geysen | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    2012-02-27 08:58:14,176 ERROR - No resource monitoring possible java.lang.ClassCastException: com.sun.management.OperatingSystem cannot be cast to com.sun.management.UnixOperatingSystemMXBean at com.cenqua.fisheye.support.SystemResourceMonitor.<init>(SystemResourceMonitor.java:18) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499) at com.cenqua.fisheye.web.jetty.FishEyeWebApplicationContext.doStart(FishEyeWebApplicationContext.java:27) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.cenqua.fisheye.web.WebServer.start(WebServer.java:276) at com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:228) at com.cenqua.fisheye.ctl.Run.main(Run.java:77) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:98) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:41) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:159) at java.lang.Thread.run(Unknown Source) 2012-02-27 08:58:54,333 INFO - Server started on :80 (http) (control port on 127.0.0.1:8059)

    Atlassian JIRA | 5 years ago | Wannes Geysen
    java.lang.ClassCastException: com.sun.management.OperatingSystem cannot be cast to com.sun.management.UnixOperatingSystemMXBean
  2. 0

    2012-02-27 08:58:14,176 ERROR - No resource monitoring possible java.lang.ClassCastException: com.sun.management.OperatingSystem cannot be cast to com.sun.management.UnixOperatingSystemMXBean at com.cenqua.fisheye.support.SystemResourceMonitor.<init>(SystemResourceMonitor.java:18) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499) at com.cenqua.fisheye.web.jetty.FishEyeWebApplicationContext.doStart(FishEyeWebApplicationContext.java:27) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.cenqua.fisheye.web.WebServer.start(WebServer.java:276) at com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:228) at com.cenqua.fisheye.ctl.Run.main(Run.java:77) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:98) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:41) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:159) at java.lang.Thread.run(Unknown Source) 2012-02-27 08:58:54,333 INFO - Server started on :80 (http) (control port on 127.0.0.1:8059)

    Atlassian JIRA | 5 years ago | Wannes Geysen
    java.lang.ClassCastException: com.sun.management.OperatingSystem cannot be cast to com.sun.management.UnixOperatingSystemMXBean

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.sun.management.OperatingSystem cannot be cast to com.sun.management.UnixOperatingSystemMXBean

      at com.cenqua.fisheye.support.SystemResourceMonitor.<init>()
    2. com.cenqua.fisheye
      SystemResourceMonitor.<init>
      1. com.cenqua.fisheye.support.SystemResourceMonitor.<init>(SystemResourceMonitor.java:18)
      1 frame
    3. Java RT
      Constructor.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      4. java.lang.reflect.Constructor.newInstance(Unknown Source)
      4 frames
    4. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
      2. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      11. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
      11 frames
    5. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
      2 frames
    6. Spring
      ContextLoaderListener.contextInitialized
      1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
      2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
      3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      3 frames
    7. Jetty Server
      WebAppContext.doStart
      1. org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549)
      2. org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
      3. org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
      4. org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
      5. org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
      5 frames
    8. com.cenqua.fisheye
      FishEyeWebApplicationContext.doStart
      1. com.cenqua.fisheye.web.jetty.FishEyeWebApplicationContext.doStart(FishEyeWebApplicationContext.java:27)
      1 frame
    9. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    10. Jetty Server
      ContextHandlerCollection.doStart
      1. org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
      2. org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
      2 frames
    11. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    12. Jetty Server
      HandlerCollection.doStart
      1. org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
      1 frame
    13. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    14. Jetty Server
      Server.doStart
      1. org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
      2. org.mortbay.jetty.Server.doStart(Server.java:224)
      2 frames
    15. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    16. com.cenqua.fisheye
      Run.main
      1. com.cenqua.fisheye.web.WebServer.start(WebServer.java:276)
      2. com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:228)
      3. com.cenqua.fisheye.ctl.Run.main(Run.java:77)
      3 frames
    17. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    18. com.cenqua.fisheye
      FishEyeCtl.main
      1. com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:98)
      2. com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:41)
      2 frames
    19. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    20. Java Service Wrapper
      WrapperStartStopApp.run
      1. org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:159)
      1 frame
    21. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame