12 Replies Latest reply on Nov 26, 2013 2:44 PM by Hirt-Oracle

    Connecting to Weblogic Domain Runtime mbean with JMC




      According to Introduction to Java Mission Control  we can either modify jmc.ini to add additional JVM argument or we can use '-vmarg' to overwrite the ones in jmc.ini or to add more argument use  --launcher.appendVmargs -vmarg. I have tried both of these options but I keep getting :


      WARNING: Unknown command 'vmarg'. Error found at row 0, from position 0 to 4


      Basically I need to connect to Weblogic Domain Runtime mbean. in Jconsole , all I needed to do to connect to WLS Domain runtime mbean was to specify the following :


      jconsole -J-Djava.class.path=$JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/lib/tools.jar:$WL_HOME/server/lib/wlfullclient.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote -debug


      And the service JMX URL would be ; service:jmx:t3://host:port/jndi/weblogic.management.mbeanservers.domainruntime


      I have tried adding the following to jmc.ini


      -Djava.class.path=$WL_HOME/server/lib/wlfullclient.jar // this file was generated and it is in that directory.




      And the service JMX URL I used is the same as the one stated above. When trying to connect  , I get the following exception :


      Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]


      What that tells me is that the '-Djava.naming.factory.initial' is being recognized but for some reason the '-Djava.class.path' is not being recognized which explains the above error ! I have checked and double checked that 'wlfullclient.jar' exists and I am pointing to the right directory.


      I have tried both jdk1.7.0_40 and jdk1.7.0_45 with no luck


      Obviously I am missing something very trivial here but can't figure it out.


      Please advice,