Try appending the jar to the bootclasspath using -Xbootclasspath/a:.
That is exactly what I did and this did solve my issue , hence I clicked on assumed answered , The problem now is that I am getting a different error :
Could not connect to myhost : java.lang:type=Runtime
Could not connect to a JVM at service:jmx:rmi://host:port/jndi/weblogic.management.mbeanservers.domainruntime. Make sure one is running and that you are using the correct protocol in the Service URL.
Any idea why ? I have no issues with JConsole
Thanks in Adavnce
Regarding the vmarg part of your issues, I notice that documentation is not correct.
The flag should be -vmargs, not -vmarg.
(My bad for missing this in docs review)
I will make sure the docs get updated.
From the error message it seems you attempted to connect with JMX over RMI instead of t3. Create a custom connection in JMC and click the Custom JMX Service URL button, then enter you URL there.
The URL I used earlier was a custom JMX and I have tried rmi,t3 and iiop and the error persists !
By looking at JMC standard out , i see :
WARNING: Could not retrieve MBean information for com.bea:ServerRuntime=AdminServer,Name=/jsp/changemgmt/needlockTable.jsp,Location=AdminServer,Type=ServletRuntime,ApplicationRuntime=consoleapp,WebAppComponentRuntime=AdminServer_/console!
That is just a warning, and likely not the root cause to your troubles. It does smell a bit like the Tomcat-reports-bogus-type-information bug. I'll ask SQE to see if they can reproduce.
Also, the JMX Console requires access to the platform MBeans to operate properly. IIRC you had to set some extra properties in WLS for this to happen.
Try setting -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder
Thanks but this is did not help. Here is what I added in jmc.ini
SQE set up a reproducer, and I found what the problem is. WLS has four possible MBean servers. The one you are connecting to does not have the Runtime MBean in it - something that is critical for a key component in JMC. I've now done a patch which gracefully degrades the capabilities in JMC (such as reporting events in server side time) if connecting to such an MBean server.
Please note that you will lose a lot of functionality when connecting to an MBean server where the platform MBeans are not deployed. I've opened a bug on the next release, 5.3.0, where the patch will be available.
Thank you very much for your support.
So, which JMX URL I should use ?
DomainRuntimeServiceMBean is the way to go though since it provides a single entry point for accessing all the hierarchies of all runtime mbeans. Add to that , Oracle recommends connection to this mbean for monitoring multiple servers.
jConsole has no issues accessing it. I developed a simple Java class which uses the same mbean and I got all the information I needed about the domain active configuration.
I tried as well accessing weblogic.management.mbeanservers.runtime.RuntimeServiceMBean and I have an issues as well with an error : Could not connect to host : null.
As the section you quoted states, that MBean is a good place for when you want to have a single point of connection, but access to information from the MBean of multiple servers. With JMC 5.3.0 this will work just like it does with JConsole, i.e. you will be able to browse and plot attributes and have trigger rules etc. That said, functionality that relies on known MBean object names, such as specific tabs for Thread analysis, the default trigger rules etc, will not work. For that to work, you should connect to an MBean server also containing the platform MBeans (in their default domain). Searching the internet should reveal ways to make that happen in WLS.