org.springframework.jmx.exceptions.MBeanAssemblyException: A JMX error occured when trying to assemble the management interface metadata.; nested exception is javax.management.MBeanRegistrationException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] MBeanException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] Cause: java.lang.ClassCastException

Spring JIRA | Jean Carriere | 1 decade 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

    I've tried to use the jmx package, the MetadataModelMBeanInfoAssembler, which is in the sandbox, with jboss. My spring context is the following: <bean id="ehcacheMonitoring" class="mypackage.service.mbean.EHCacheMonitoring"> </bean> <bean id="jmxAdapter" class="org.springframework.jmx.JmxMBeanAdapter" > <property name="assembler"> <ref bean="metadataAssembler"/> </property> <property name="namingStrategy"> <ref bean="metadataNaming"/> </property> </bean> <bean id="metadataAssembler" class="org.springframework.jmx.assemblers.metadata.MetadataModelMBeanInfoAssembler"> <property name="attributeSource"> <ref bean="attributesImpl"/> </property> </bean> <bean id="metadataNaming" class="org.springframework.jmx.naming.MetadataNamingStrategy"> <property name="attributeSource"> <ref bean="attributesImpl"/> </property> </bean> <bean id="attributesImpl" class="org.springframework.jmx.metadata.support.commons.CommonsAttributesJmxAttributeSource"/> My bean is * * @@org.springframework.jmx.metadata.support.ManagedResource(...) */ public class EHCacheMonitoring implements EHCacheMonitoringMBean { /** * @@org.springframework.jmx.metadata.support.ManagedOperation(...) */ public String showCachesInfo() throws CacheException { ..... } } The exception is 10:01:59,859 ERROR [ContextLoader] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmxAdapter' defined in ServletContext resource [/WEB-INF/classes/serviceContext.xml]: Initialization of bean failed; nested exception is org.springframework.jmx.exceptions.MBeanAssemblyException: A JMX error occured when trying to assemble the management interface metadata.; nested exception is javax.management.MBeanRegistrationException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] org.springframework.jmx.exceptions.MBeanAssemblyException: A JMX error occured when trying to assemble the management interface metadata.; nested exception is javax.management.MBeanRegistrationException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] MBeanException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] Cause: java.lang.ClassCastException at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:160) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59) at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43) at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93) at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76) at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:144) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:997) at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:327) at org.springframework.jmx.JmxMBeanAdapter.registerSimpleBean(JmxMBeanAdapter.java:295) at org.springframework.jmx.JmxMBeanAdapter.registerBean(JmxMBeanAdapter.java:272) at org.springframework.jmx.JmxMBeanAdapter.registerBeans(JmxMBeanAdapter.java:218) at org.springframework.jmx.JmxMBeanAdapter.afterPropertiesSet(JmxMBeanAdapter.java:117) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1037) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:305) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:236) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:261) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:317) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:131) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:177) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:105) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:4 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTomcatService.java:530) at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomcatService.java:309) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605) at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:229) at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOpByName(HtmlAdaptorServlet.java:266) at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:81) at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.java:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) nb: I've checked out the sandbox on 2005/12/01

    Spring JIRA | 1 decade ago | Jean Carriere
    org.springframework.jmx.exceptions.MBeanAssemblyException: A JMX error occured when trying to assemble the management interface metadata.; nested exception is javax.management.MBeanRegistrationException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] MBeanException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] Cause: java.lang.ClassCastException
  2. 0

    I've tried to use the jmx package, the MetadataModelMBeanInfoAssembler, which is in the sandbox, with jboss. My spring context is the following: <bean id="ehcacheMonitoring" class="mypackage.service.mbean.EHCacheMonitoring"> </bean> <bean id="jmxAdapter" class="org.springframework.jmx.JmxMBeanAdapter" > <property name="assembler"> <ref bean="metadataAssembler"/> </property> <property name="namingStrategy"> <ref bean="metadataNaming"/> </property> </bean> <bean id="metadataAssembler" class="org.springframework.jmx.assemblers.metadata.MetadataModelMBeanInfoAssembler"> <property name="attributeSource"> <ref bean="attributesImpl"/> </property> </bean> <bean id="metadataNaming" class="org.springframework.jmx.naming.MetadataNamingStrategy"> <property name="attributeSource"> <ref bean="attributesImpl"/> </property> </bean> <bean id="attributesImpl" class="org.springframework.jmx.metadata.support.commons.CommonsAttributesJmxAttributeSource"/> My bean is * * @@org.springframework.jmx.metadata.support.ManagedResource(...) */ public class EHCacheMonitoring implements EHCacheMonitoringMBean { /** * @@org.springframework.jmx.metadata.support.ManagedOperation(...) */ public String showCachesInfo() throws CacheException { ..... } } The exception is 10:01:59,859 ERROR [ContextLoader] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmxAdapter' defined in ServletContext resource [/WEB-INF/classes/serviceContext.xml]: Initialization of bean failed; nested exception is org.springframework.jmx.exceptions.MBeanAssemblyException: A JMX error occured when trying to assemble the management interface metadata.; nested exception is javax.management.MBeanRegistrationException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] org.springframework.jmx.exceptions.MBeanAssemblyException: A JMX error occured when trying to assemble the management interface metadata.; nested exception is javax.management.MBeanRegistrationException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] MBeanException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] Cause: java.lang.ClassCastException at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:160) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59) at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43) at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93) at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76) at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:144) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:997) at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:327) at org.springframework.jmx.JmxMBeanAdapter.registerSimpleBean(JmxMBeanAdapter.java:295) at org.springframework.jmx.JmxMBeanAdapter.registerBean(JmxMBeanAdapter.java:272) at org.springframework.jmx.JmxMBeanAdapter.registerBeans(JmxMBeanAdapter.java:218) at org.springframework.jmx.JmxMBeanAdapter.afterPropertiesSet(JmxMBeanAdapter.java:117) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1037) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:305) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:236) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:261) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:317) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:131) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:177) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:105) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:4 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTomcatService.java:530) at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomcatService.java:309) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605) at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:229) at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOpByName(HtmlAdaptorServlet.java:266) at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:81) at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.java:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) nb: I've checked out the sandbox on 2005/12/01

    Spring JIRA | 1 decade ago | Jean Carriere
    org.springframework.jmx.exceptions.MBeanAssemblyException: A JMX error occured when trying to assemble the management interface metadata.; nested exception is javax.management.MBeanRegistrationException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] MBeanException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] Cause: java.lang.ClassCastException

    Root Cause Analysis

    1. org.springframework.jmx.exceptions.MBeanAssemblyException

      A JMX error occured when trying to assemble the management interface metadata.; nested exception is javax.management.MBeanRegistrationException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] MBeanException: preRegister() failed [ObjectName='spring:bean=EHCacheMonitoring', Class=javax.management.modelmbean.RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean@f1b95f)] Cause: java.lang.ClassCastException

      at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean()
    2. org.jboss.mx
      BasicMBeanRegistry.registerMBean
      1. org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:160)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:324)
      3 frames
    4. org.jboss.mx
      PersistenceInterceptor2.invoke
      1. org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      2. org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59)
      3. org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43)
      4. org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93)
      4 frames
    5. JBoss Application Server J2SE
      MBeanInvoker.invoke
      1. org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76)
      1 frame
    6. Java RT
      RequiredModelMBean.invoke
      1. javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:144)
      1 frame
    7. JBoss Application Server J2SE
      MBeanServerImpl.registerMBean
      1. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      2. org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:997)
      3. org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:327)
      3 frames
    8. Spring Context
      JmxMBeanAdapter.afterPropertiesSet
      1. org.springframework.jmx.JmxMBeanAdapter.registerSimpleBean(JmxMBeanAdapter.java:295)
      2. org.springframework.jmx.JmxMBeanAdapter.registerBean(JmxMBeanAdapter.java:272)
      3. org.springframework.jmx.JmxMBeanAdapter.registerBeans(JmxMBeanAdapter.java:218)
      4. org.springframework.jmx.JmxMBeanAdapter.afterPropertiesSet(JmxMBeanAdapter.java:117)
      4 frames
    9. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1037)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:305)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:223)
      4. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:236)
      5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
      6. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:261)
      6 frames
    10. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:317)
      1 frame
    11. Spring
      ContextLoader.initWebApplicationContext
      1. org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:131)
      2. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:177)
      3. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:105)
      3 frames