Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6705499

Bad JMXConnectorProvider class name prevents all connections - even with standard RMI connector.

    XMLWordPrintable

    Details

      Description

      I have created a jar file containing a JMXConnectorProvider - but I mistakenly mispelled the name of the implementation class in the services/javax.management.remote.JMXConnectorProvider file.

      If this jar is in the classpath of a JMX client, like e.g. jconsole or visualvm, it prevents it from connecting with any kind of connectors - including the standard RMI connector.

      See comments for reproducing the stack trace of the exception:

      java.lang.IllegalArgumentException: javax.management.remote.JMXConnectorProvider: Provider com.sun.jmxns.provider.JMXNSConnectorProvider not found
              at com.sun.jmx.remote.util.Service.fail(Service.java:129)
              at com.sun.jmx.remote.util.Service.access$000(Service.java:111)
              at com.sun.jmx.remote.util.Service$LazyIterator.next(Service.java:272)
              at javax.management.remote.JMXConnectorFactory.getConnectorAsService(JMXConnectorFactory.java:425)
              at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:310)
              at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:247)
              at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:207)
              at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:337)
              at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:297)
              at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:280)

        Attachments

          Activity

            People

            Assignee:
            jbachorik Jaroslav BachorĂ­k
            Reporter:
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: