[collectd] Java plugin - Cannot find the API class "org.collectd.api.Collectd"

Franklin, Dave Dave.Franklin at arrisi.com
Thu Oct 31 14:56:25 CET 2013

A few things I can think of off the top of my head:

It would be interesting to see what the log output is with DEBUG cranked up - it should show all the JVM args passed in before the JVM is created.
Also I see you’re logged in as root - is collectd running with sufficient permissions?
Can you confirm the class is actually in the jar file: jar tf /usr/share/collectd/java/collectd-api.jar


Dave Franklin
Principal Software Engineer
Arris Group, Inc. - T1-9
900 Chelmsford Street
Lowell, MA 01851

From: collectd-bounces at verplant.org [mailto:collectd-bounces at verplant.org] On Behalf Of Dan Scott
Sent: Wednesday, September 18, 2013 9:37 AM
To: collectd at verplant.org
Subject: [collectd] Java plugin - Cannot find the API class "org.collectd.api.Collectd"


I'm running collectd 5.04 on AWS:


I'm trying to get the java plugin working to monitor tomcat. I have a config file as follows:

LoadPlugin java

<Plugin "java">
        JVMARG "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/generic-jmx.jar"

        LoadPlugin "org.collectd.java.GenericJMX"
        <Plugin "GenericJMX">
# Heap memory usage
<MBean "memory-heap">
  ObjectName "java.lang:type=Memory"
  InstancePrefix "memory-heap"
    Type "jmx_memory"
    Table true
    Attribute "HeapMemoryUsage"

      Host "localhost"
      ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:17264/jmxrmi"
      Collect "memory_pool"

The log file says: Cannot find the API class "org.collectd.api.Collectd". Please set the correct class path using 'JVMArg "-Djava.class.path=..."'

But as you can see, I already have this line added. The jar files exist and contain the correct classes:

[root at localhost ~]# rpm -ql collectd-java

Can anyone help?


Dan Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20131031/b6367e28/attachment.html>

More information about the collectd mailing list