pthulasiram / jmxetric

Automatically exported from code.google.com/p/jmxetric
MIT License
0 stars 0 forks source link

Exception in thread "main" java.lang.NoClassDefFoundError: jmxetric/JMXetricAge #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

I'm attempting to integrate jmxetric with WowzaMediaServer.  The
environment is configured in a file called setenv.sh.  Here's what I have
in that file:

#!/bin/sh

_EXECJAVA=java

JAVA_OPTS="-Xmx2000M"

JMXETRIC_CONFIG="host=localhost,port=8649,wireformat31x=true,config=/etc/jmxetri
c/jmxetric.xml"

JMXETRIC_AGENT="-Djava.util.logging.config.file=/etc/jmxetric/logging.properties
-javaagent:/usr/local/jmxetric/jmxetric-0.0.3.jar=$JMXETRIC_CONFIG
jmxetric.JMXetricAge"

JAVA_OPTS="$JAVA_OPTS -server"

JAVA_OPTS="$JAVA_OPTS $JMXETRIC_AGENT"

WMSAPP_HOME=/usr/local/WowzaMediaServer
WMSCONFIG_HOME=/usr/local/WowzaMediaServer
WMSCONFIG_URL=

export WMSAPP_HOME WMSCONFIG_HOME JAVA_OPTS _EXECJAVA

Most of it is irrelevant, but you can see the parts that relate to
jmxetric.  When I try to start up java, I get this:

JMXetricAgent instrumented JVM, see http://code.google.com/p/jmxetric
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService configure
CONFIG: Command line argument found: host=localhost
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService configure
CONFIG: Command line args: port=8649
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService configure
CONFIG: Command line args: config=/etc/jmxetric/jmxetric.xml
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService configure
CONFIG: Command line args: mode=multicast
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService configure
CONFIG: Command line args: wireformat31x=true
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureGangliaFromXML
FINE: GMetric host=localhost port=8649 mode=multicast v31x=true
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Sample is [sample: null]
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Mbean is java.lang:type=Memory
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is init
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is committed
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is used
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is max
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is init
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is committed
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is used
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is max
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Mbean is java.lang:type=Threading
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is ThreadCount
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is DaemonThreadCount
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Mbean is java.lang:type=OperatingSystem
Jan 20, 2010 12:45:52 PM jmxetric.XMLConfigurationService
configureJMXetricFromXML
FINER: Attr is ProcessCpuTime
Exception in thread "main" java.lang.NoClassDefFoundError: jmxetric/JMXetricAge
Caused by: java.lang.ClassNotFoundException: jmxetric.JMXetricAge
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Jan 20, 2010 12:45:52 PM jmxetric.MBeanSampler$MBeanAttribute publish
FINE: Sampling java.lang:type=Memory attribute NonHeapMemoryUsage.init:24313856
Jan 20, 2010 12:45:52 PM jmxetric.MBeanSampler$MBeanAttribute publish
FINER: Announcing metric attributeName=NonHeapMemoryUsage
canonicalName=NonHeapMemoryUsage.init units=bytes type=INT32 slope=BOTH
publishName=ProcessName_Memory_NonHeap_init value=24313856
Could not find the main class: jmxetric.JMXetricAge.  Program will exit.

Why can't it find the class?  Any pointers?

Original issue reported on code.google.com by dsmith...@gmail.com on 20 Jan 2010 at 10:43

GoogleCodeExporter commented 8 years ago
In fact, I can greatly simplify this.  I can tell you that running the 
following java
command produces the same error:

java -Djava.util.logging.config.file=/etc/jmxetric/logging.properties
-javaagent:/usr/local/jmxetric/jmxetric-0.0.3.jar=host=localhost,port=8649,wiref
ormat31x=true,config=/etc/jmxetric/jmxetric.xml
jmxetric.JMXetricAge

Original comment by dsmith...@gmail.com on 20 Jan 2010 at 10:58

GoogleCodeExporter commented 8 years ago
I think I realize now that jmxetric.JMXetricAge is supposed to be
jmxetric.JMXetricAgent.  Woops.

Original comment by dsmith...@gmail.com on 20 Jan 2010 at 11:22

GoogleCodeExporter commented 8 years ago

Original comment by jasper...@gmail.com on 2 Feb 2010 at 8:44