Select JMX remoting provider at runtime

D

Daniel Santos

Hello!

I have two JMX remoting providers in the classpath :

- mx4j 3.0.1
- JMX JSR 160 RI 1.0

I am trying to start the rmi connector server of the sun RI.
Even when setting the system property :
jmx.remote.protocol.provider.pkgs=com.sun.jmx.remote
The implementation used is the one from mx4j.

I get the exception :

java.io.IOException: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused]
at mx4j.remote.resolver.rmi.Resolver.bindServer(Resolver.java:199)
at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:152)
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:324)
at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:410)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:228)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:822)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
... stack frames of my code ...

Also tried putting the property in the environment map that is passed to
the connector server creation call, but no cigar

Help wanted
 
D

Daniel Santos

Hello!

I have two JMX remoting providers in the classpath :

- mx4j 3.0.1
- JMX JSR 160 RI 1.0

I am trying to start the rmi connector server of the sun RI.
Even when setting the system property :
jmx.remote.protocol.provider.pkgs=com.sun.jmx.remote


Typo : the property value is com.sun.jmx.remote.protocol

The implementation used is the one from mx4j.

I get the exception :

java.io.IOException: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused]
at mx4j.remote.resolver.rmi.Resolver.bindServer(Resolver.java:199)
at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:152)
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:324)
at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:410)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:228)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:822)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
... stack frames of my code ...

Also tried putting the property in the environment map that is passed to
the connector server creation call, but no cigar

Help wanted
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top