Select JMX remoting provider at runtime

Discussion in 'Java' started by Daniel Santos, Jan 24, 2007.

  1. 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
    Daniel Santos, Jan 24, 2007
    #1
    1. Advertising

  2. On Wed, 24 Jan 2007 12:44:40 +0000, Daniel Santos wrote:

    > 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
    Daniel Santos, Jan 24, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BS
    Replies:
    3
    Views:
    2,042
    Alvin Bruney [MVP]
    Jun 17, 2004
  2. sloan
    Replies:
    5
    Views:
    1,496
    sloan
    Jun 4, 2006
  3. sloan
    Replies:
    1
    Views:
    496
    Chad Scharf
    Jul 3, 2007
  4. mike
    Replies:
    0
    Views:
    343
  5. Peter Stojkovic
    Replies:
    0
    Views:
    468
    Peter Stojkovic
    Mar 30, 2006
Loading...

Share This Page