Hi,

I am using GenericJMX plugin in order to connect to weblogic MBean. Here is my 
connectd.conf:

<Plugin "java">
    JVMArg "-verbose:jni"
    JVMArg 
"-Djava.class.path=/opt/collectd/share/collectd/java/tmp/wlfullclient.jar:/opt/collectd/share/collectd/java/tmp/collectd-api.jar:/opt/collectd/share/collectd/java/tmp/generic-jmx.jar"
    JVMArg "-Djava.naming.factory.initial=weblogic.jndi.WLInitialContextFactory"
    JVMArg "-Dweblogic.security.TrustKeyStore=DemoTrust"
    JVMArg "-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote"

    
    
    LoadPlugin "org.collectd.java.GenericJMX"
        <Plugin "GenericJMX">
        
        <MBean "JMSDestinationRuntimeMBean">
          ObjectName "java.lang:type=MessagesCurrentCount"
          InstancePrefix "webLogic."
          InstanceFrom "punvm."
          <Value>
            Type "web_logic"
            InstancePrefix ""
            InstanceFrom "punvm_instance"
            Table false
            Attribute "MessagesCurrentCount"
          </Value>
        </MBean>
        
        <Connection>
Host "punws-amitk1"

ServiceURL 
"service:jmx:iiop://punws-amitk1:7001/jndi/weblogic.management.mbeanservers.domainruntime"
          User "weblogic"
          Password "weblogic123"
          Collect "JMSDestinationRuntimeMBean"
        </Connection>

    </Plugin>    

</Plugin>


In the above collectd.conf, I want to connect to runtime MBean using weblogic 
initial context factory "weblogic.jndi.WLInitialContextFactory". But if I start 
the collectd, I get the following error:

[2013-03-22 14:23:31] GenericJMXConfConnection: Creating MBean server 
connection failed: java.io.IOException: Failed to retrieve RMIServer stub: 
javax.naming.NoInitialContextException: Cannot instantiate class: 
weblogic.jndi.WLInitialContextFactory [Root exception is 
java.lang.ClassNotFoundException: weblogic/jndi/WLInitialContextFactory]

Note that I have the class WLInitialContextFactory into wlfullclient.jar.
Do you know what is the reason behind getting ClassNotFoundException even 
though the classpath is properly given?

Thanks,
-Anand
_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to