Announcement Announcement Module
Collapse
No announcement yet.
"javax.naming.NameNotFoundException" Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • "javax.naming.NameNotFoundException"

    Env: JDK1.6, Spring 2.5

    I am attempting to manually open remoting to an MBean server as follows:

    Code:
      String url = "service:jmx:rmi:///jndi/rmi://10.1.1.1:7819/MyDomain";
      JMXConnector jmxc = MXConnectorFactory.connect(url, null);
      MBeanServerConnection conn = jmxc.getMBeanServerConnection();
      //...
    This causes the following exception. I have tried this by starting
    rmiregistry explicitly; still no avail.

    Code:
    'service:jmx:rmi:///jndi/rmi://10.1.1.1:7819/MyDomain
    java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: MyDomain
    What am I doing wrong?

    /Ur

  • #2
    javax.naming.NameNotFoundException

    The JMXConnectorFactory "connect" methods all require a JMXServiceURL as a parameter to the constructor rather than a String, but I assume that is actually what you have done to get the runtime error you are seeing. I also prefer the single-argument JMXConnectoryFactory.connect when not passing in an environment map.

    Is your JMX Connector Server specified as using MyDomain as well in its URL? For example, do you have "MyDomain" included in your Spring's serviceUrl property of the ConnectorServerFactoryBean serverConnector?

    Comment

    Working...
    X