> I am using CXF v2.2.10, Spring 3.0.4, jdk 1.5.0_22.
> 
> Does anyone know what am I doing wrong?

Can you try with a much newer version of CXF?     There's been a ton of 
updates around management and other areas and the issue may already be fixed.

Dan




On Thursday, February 16, 2012 12:51:57 AM javinott wrote:
> Hello,
> 
> I am trying to enable JMX monitoring in order to get web service performance
> metrics. I am following the guide at
> http://cxf.apache.org/docs/jmx-management.html
> http://cxf.apache.org/docs/jmx-management.html   but I am getting this
> exception when deploying my services:
> 
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.cxf.workqueue.WorkQueueManager': Invocation of init
> method failed; nested exception is java.lang.NullPointerException
>       at
> org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostPr
> ocessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcess
> or.java:133) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFact
> ory.java:394) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1413) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .createBean(AbstractAutowireCapableBeanFactory.java:456) at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
> stractBeanFactory.java:291) at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
> ngleton(DefaultSingletonBeanRegistry.java:222) at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
> ractBeanFactory.java:288) at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
> ctBeanFactory.java:190) at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
> antiateSingletons(DefaultListableBeanFactory.java:580) at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFac
> toryInitialization(AbstractApplicationContext.java:895) at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
> actApplicationContext.java:425) at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
> ntextLoader.java:276) at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
> extLoader.java:197) at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
> textLoaderListener.java:47) at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> 3764) at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>       at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>       at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>       at 
org.apache.catalina.core.StandardService.start(StandardService.java:448)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> ) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25) at java.lang.reflect.Method.invoke(Method.java:592)
>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> Caused by: java.lang.NullPointerException
>       at
> org.apache.cxf.management.jmx.InstrumentationManagerImpl.registerMBeanWithSe
> rver(InstrumentationManagerImpl.java:268) at
> org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(Instrument
> ationManagerImpl.java:169) at
> org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(Instrument
> ationManagerImpl.java:186) at
> org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(Instrument
> ationManagerImpl.java:179) at
> org.apache.cxf.workqueue.WorkQueueManagerImpl.register(WorkQueueManagerImpl.
> java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> ) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25) at java.lang.reflect.Method.invoke(Method.java:592)
>       at
> org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostPr
> ocessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:
> 340) at
> org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostPr
> ocessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostPro
> cessor.java:293) at
> org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostPr
> ocessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcess
> or.java:130) ... 29 more
> 
> I am using Tomcat 5.5 server and I've added the following parameters to
> enable jmx:
> 
> -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port=9696
> -Dcom.sun.management.jmxremote.ssl=false
> 
> On my spring xml config file I've declared the InstrumentationManager bean
> in the following way:
> 
> <bean id="org.apache.cxf.management.InstrumentationManager"
> class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
> <property name="bus" ref="cxf" />
> <property name="enabled" value="true" />
> <property name="threaded" value="false" />
> <property name="daemon" value="false" />
> <property name="usePlatformMBeanServer" value="true"/>
> </bean>
> 
> I've also declared the CounterRepository bean:
> 
> <bean id="CounterRepository"
> class="org.apache.cxf.management.counters.CounterRepository">
>      <property name="bus" ref="cxf" />
> </bean>
> 
> I am using CXF v2.2.10, Spring 3.0.4, jdk 1.5.0_22.
> 
> Does anyone know what am I doing wrong?
> 
> Thank you very much
> 
> Javier Martinez
> 
> 
> 
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Problems-enabling-JMX-monitoring-tp5488906p
> 5488906.html Sent from the cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to