oraoraora
Contributor
Contributor

Exception in thread "main" java.lang.NoClassDefFoundError: org/hyperic/hq/bizapp/agent/client/AgentClient

We are trying to use this product to monitor SOA 11g on Weblogic Server on Linux 86-64 bit.....  We are getting this error...

/oracle/hyperic/agent-4.6.6/bin

[oracle@soa01 bin]$ ls

hq-agent.bat  hq-agent.sh

[oracle@soa01 bin]$ ./hq-agent.sh stop

Stopping HQ Agent...

Stopped HQ Agent.

[oracle@soa01 bin]$ ./hq-agent.sh start

Starting HQ Agent...... running (1996).

Exception in thread "main" java.lang.NoClassDefFoundError: org/hyperic/hq/bizapp/agent/client/AgentClient

Caused by: java.lang.ClassNotFoundException: org.hyperic.hq.bizapp.agent.client.AgentClient

  at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

  at java.security.AccessController.doPrivileged(Native Method)

  at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

  at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Could not find the main class: org.hyperic.hq.bizapp.agent.client.AgentClient.  Program will exit.

-- SETTINGS are for JRE are here...which are used for WLS for SOA also.... ( the default JRE home was giving same error we tried our luck with what we sued for WLS - same issue )

/oracle/hyperic/agent-4.6.6/bundles/agent-4.6.6/conf/wrapper.conf

# default JAVA_HOME in case it is not already set

set.default.HQ_JAVA_HOME=/oracle/jdk1.7.0_51/jre

-- SETTINGS for... agent.properties file

# required to find server/lib/weblogic.jar

weblogic.installpath=/oracle/middleware/wlserver_10.3/

-- SETTINGS for bundles/bin/hq-agent.sh

ENT_CLASSPATH="${AGENT_LIB}/cryptoj.jar"

CLIENT_CLASSPATH="${AGENT_LIB}/wlfullclient.jar"

0 Kudos
1 Reply
admin
Immortal
Immortal

Hi,

Please share your hq-agent.sh file (..\bundles\agents-4.6.6\bin) or verify that you have all lines below. Looks like you dropped previous class path:

CLIENT_CLASSPATH="${AGENT_LIB}/hq-agent-core-4.6.6.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${AGENT_LIB}"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${PDK_LIB}/hq-common-4.6.6.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${PDK_LIB}/hq-util-4.6.6.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${PDK_LIB}/hq-pdk-4.6.6.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${PDK_LIB}/ant-1.7.1.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${PDK_LIB}/commons-logging-1.0.4.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${PDK_LIB}/log4j-1.2.14.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${PDK_LIB}/sigar-1.6.6.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${PDK_LIB}/httpclient-4.1.1.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${PDK_LIB}/httpcore-4.1.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${PDK_LIB}/spring-core-3.0.5.RELEASE.jar"

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${AGENT_LIB}/hq-lather-4.6.6.jar"

CLIENT_CLASS=org.hyperic.hq.bizapp.agent.client.AgentClient

I recommend to revert original file  hq-agent.sh and add concatenate your JARs.

CLIENT_CLASSPATH="${CLIENT_CLASSPATH}:${AGENT_LIB}/wlfullclient.jar"

Good Luck

0 Kudos