Wednesday, April 07, 2010

Exception in thread "main" java.lang.NoClassDefFoundError: oracle/bi/analytics/management/StandardConsoleAgent

Hi Friends,

This is my newest experiment going on with OBIEE Management Pack in Oracle Enterprise Manager (OEM) Tool (Oracle Management Server (OMS)) & OBIEE Application.

OBIEE Management Pack needs to read the performance values exposed over JMX. In order to start this utility, we need to configure the runagent.sh or runagent.cmd under /$OBIEE_ROOT/systemsmanagement/

Following is the sample runagent.sh file setup for a OBIEE Setup on Unix Platform:

#!/bin/sh
# this is a template of runagent.sh to be used on Unix.
# The installer will fill in JAVA_HOME, SAROOTDIR, and SATEMPDIR

export JAVA_HOME="/usr/java/jdk1.5.0_19"
export SAROOTDIR=/$OBIEE_ROOT/
export SADATADIR=/$OBIEE_DATA/
export SATEMPDIR=/$OBIEE_DATA/tmp
export UNIXPERFDIR=${SATEMPDIR}

java_cmd="${JAVA_HOME}/bin/java -Djava.library.path=${SAROOTDIR}/server/Bin -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9980 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -classpath analytics-jmx.jar:lib/xmlparserv2.jar oracle.bi.analytics.management.StandardConsoleAgent"

${java_cmd}


Now if you carefully observe, if you invoke the script from your home directory, the classpath will fail to resolve & give error like:
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/bi/analytics/management/StandardConsoleAgent

Above issue is purely due to the way classpath parameter is given in java_cmd: -classpath analytics-jmx.jar:lib/xmlparserv2.jar oracle.bi.analytics.management.StandardConsoleAgent

The analytics-jmx.jar & xmlparsev2.jar are not resolved as absolute path locations are not given here. So you need to manually change your directory till /$OBIEE_ROOT/systemsmanagement/ & then invoke runagent.sh file to start the JMX Performance counters successfully.

The JMX Performance Counters needs to be exposed constantly so that OBIEE Management Pack reads correct values. To achieve this, you need to start the runagent.sh file in background mode. e.g.-bash-3.00$ runagent.sh &  or-bash-3.00$ nohup runagent.sh & so even after you logoff your session, the utility keeps running & gathers correct values.

Enjoy!

Keywords:
OBIEE, Siebel Analytics, Business Intelligence, Oracle Enterprise Manager Grid Control, OMS, Oracle Management Server, OEM, Grid Control, JMX, JAVA, OBIEE Performance, etc

No comments: