cacho
Sep 20th, 2005, 03:57 AM
Hi All
I´ve the following service:
<bean
id="jmxconnector"
class="org.springframework.jmx.support.ConnectorServerFac toryBean">
<property
name="serviceUrl"
value="service:jmx:jmxmp://localhost:9876" />
<property
name="threaded"
value="true" />
<property
name="daemon"
value="true" />
<property
name="server"
ref="mbeanserver" />
</bean>
And I want to add rmi then I did:
<bean id="rmiconnector"
class="org.springframework.jmx.support.ConnectorServerFac toryBean">
<property name="objectName" value="connector:name=rmi"/>
<property name="serviceUrl"
value="service:jmx:rmi://localhost/jndi/rmi://localhost:2099/" />
<property
name="server"
ref="mbeanserver" />
</bean>
but I receive a startup error as follows:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jmxconnector' defined in ServletContext resource [/WEB-INF/remoteServices.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/management/MBeanServerConnection
java.lang.NoClassDefFoundError: javax/management/MBeanServerConnection
at javax.management.remote.rmi.RMIConnectorServer.obj ectToBind(RMIConnectorServer.java:722)
at javax.management.remote.rmi.RMIConnectorServer.sta rt(RMIConnectorServer.java:393)
at org.springframework.jmx.support.ConnectorServerFac toryBean.afterPropertiesSet(ConnectorServerFactory Bean.java:198)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:962)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:354)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:223)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:271)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:312)
at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:134)
at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:230)
at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:156)
at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 48)
at org.jasig.cas.web.init.SafeContextLoaderListener.c ontextInitialized(SafeContextLoaderListener.java:6 2)
at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4343)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1083)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:789)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:478)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:480)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:425)
Why this error ? How could I solve it ?
Thanks in advance
C
I´ve the following service:
<bean
id="jmxconnector"
class="org.springframework.jmx.support.ConnectorServerFac toryBean">
<property
name="serviceUrl"
value="service:jmx:jmxmp://localhost:9876" />
<property
name="threaded"
value="true" />
<property
name="daemon"
value="true" />
<property
name="server"
ref="mbeanserver" />
</bean>
And I want to add rmi then I did:
<bean id="rmiconnector"
class="org.springframework.jmx.support.ConnectorServerFac toryBean">
<property name="objectName" value="connector:name=rmi"/>
<property name="serviceUrl"
value="service:jmx:rmi://localhost/jndi/rmi://localhost:2099/" />
<property
name="server"
ref="mbeanserver" />
</bean>
but I receive a startup error as follows:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jmxconnector' defined in ServletContext resource [/WEB-INF/remoteServices.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/management/MBeanServerConnection
java.lang.NoClassDefFoundError: javax/management/MBeanServerConnection
at javax.management.remote.rmi.RMIConnectorServer.obj ectToBind(RMIConnectorServer.java:722)
at javax.management.remote.rmi.RMIConnectorServer.sta rt(RMIConnectorServer.java:393)
at org.springframework.jmx.support.ConnectorServerFac toryBean.afterPropertiesSet(ConnectorServerFactory Bean.java:198)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:962)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:354)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:223)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:271)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:312)
at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:134)
at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:230)
at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:156)
at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 48)
at org.jasig.cas.web.init.SafeContextLoaderListener.c ontextInitialized(SafeContextLoaderListener.java:6 2)
at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4343)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1083)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:789)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:478)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:480)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:425)
Why this error ? How could I solve it ?
Thanks in advance
C