title: Connect Java Mission Control to Wildfly 16
body: <p>I try to connect Java Mission Control (JMC) with <a href="https://en.m.wikipedia.org/wiki/WildFly" rel="noreferrer">Wildfly</a> 16. Application server lays on Docker. </p>
  
  <p>I successfully connected to wildfly via jconsole, to manage it I followed steps described <a href="https://www.perftactique.com/2017/03/11/how-to-activate-jmx-access-to-wildfly-using-jconsole-and-hp-sitescope/" rel="noreferrer">here</a>.  </p>
  
  <p>Unfortunately, I have no luck to connect via JMC. The URL which I use looks like this: </p>
  
  <blockquote>
    <p>service:jmx:remoting-jmx://192.168.99.100:9990</p>
  </blockquote>
  
  <ul>
  <li>I tried to set Xbootclasspath to jboss-cli-client.jar as it was described <a href="https://stackoverflow.com/questions/36750032/how-to-connect-to-remote-wildfly-using-jmc">here</a>, but I just get <code>Unable to connect</code> error. </li>
  <li>I set the same jars, which are used for jconsole, but still I got <code>Unable to connect</code>. </li>
  <li>I gave a try to adding flags on container site, as it was shown <a href="https://stackoverflow.com/questions/151238/has-anyone-ever-got-a-remote-jmx-jconsole-to-work">here</a>, but with these flags, even wildfly haven't started. </li>
  </ul>
  
  <p>Then, I found <a href="https://community.oracle.com/thread/2592885?start=0&amp;tstart=0" rel="noreferrer">here</a> the idea to hardcode some jboss classes to enable connection via remoting-jmx. I changed version of jars, according to these provided by wildfly16 and put it to jmc.ini like this.</p>
  
  <pre><code>-Xbootclasspath/a:"C:/Program Files/Java/jdk-10.0.2/lib/missioncontrol/dropins/jboss-cli-client.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/remoting-jmx/main/remoting-jmx-3.0.1.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/remoting/main/jboss-remoting-5.0.8.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/logging/main/jboss-logging-3.3.2.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/xnio/main/xnio-api-3.6.5.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/xnio/nio/main/xnio-nio-3.6.5.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/marshalling/main/jboss-marshalling-2.0.6.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/marshalling/river/main/jboss-marshalling-river-2.0.6.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/cli/main/wildfly-cli-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/staxmapper/main/staxmapper-1.3.0.Final;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/protocol/main/wildfly-protocol-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/dmr/main/jboss-dmr-1.5.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/controller-client/main/wildfly-controller-client-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/threads/main/jboss-threads-2.3.3.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.7.Final.jar"
  </code></pre>
  
  <p>After that, finally, I have another error, which is </p>
  
  <blockquote>
    <p>Could not initialize class org.jboss.remotingjmx.RemotingConnector</p>
  </blockquote>
  
  <p>I added dependencies of <code>remoting-jmx-3.0.1.Final</code> to Xbootclasspath, but I got still the same error.  </p>
  
  <p>My question is, have you got any idea, how to make this connection works ? Maybe someone have done it in different way ?</p>
  
  <p>Any advices how can i debug this problem, will be priceless? Because I'm lack of ideas how to solve it. </p>