Hawk Agent throws a ClassNotFoundException after configuring an AMX microagent.

Hawk Agent throws a ClassNotFoundException after configuring an AMX microagent.

book

Article ID: KB0094550

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix Service Grid -
TIBCO ActiveMatrix Service Bus -
TIBCO ActiveMatrix BusinessWorks Service Engine -

Description

Description:
After configuring HKAM for AMX/BPM, the host microagent will appear on the Hawk Display. After installing AMX 3.3.0 HF-12 or above, this is no longer the case.




Symptoms:
Hawk Agent shows a stack trace upon startup causing the AMX plugin to fail to initialize. The exception below can be found in the Hawk.log file under the "<TIBCO_CONFIG_HOME>\cfgmgmt\hawk\logs" directory.

---
ERROR : Error loading microagent from com.tibco.hawk.microagent.amx.hpa.AMXHost: java.lang.ClassNotFoundException: com.tibco.hawk.microagent.amx.hpa.AMXHost ## Wed May 04 13:24:50 PDT 2016 ##
EXCEPTION : java.lang.ClassNotFoundException: com.tibco.hawk.microagent.amx.hpa.AMXHost
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at COM.TIBCO.hawk.agent.maloader.MALoader.loadMicroAgentsFromHmaFiles(MALoader.java:184)
    at COM.TIBCO.hawk.agent.maloader.MALoader.loadMicroAgents(MALoader.java:51)
    at COM.TIBCO.hawk.agent.HawkAgent.loadMicroagents(HawkAgent.java:279)
    at COM.TIBCO.hawk.agent.HawkAgent.<init>(HawkAgent.java:105)
    at COM.TIBCO.hawk.agent.HawkAgent.main(HawkAgent.java:449)
 ## Wed May 04 13:24:50 PDT 2016 ##
---

Cause:
This is a known issue awaiting a fix. The cause is that the application of AMX 3.3.0 Hotfix-12 or above incorrectly modifies a few classpaths in the Hawk HMA file.

Resolution

The workaround is to replace the JAR files in the hawkamxhpa-Admin-amxadmin-AdminHost.hma to use older JAR files. To resolve the issue, open hawkamxhpa-Admin-amxadmin-AdminHost.hma and replace new JAR versions with old ones that are part of 3.3.0 HF-10. Here is the block in the .hma file that needs to be replaced.

<classpath>
<TIBCO_HOME>/components/shared/1.0.0/plugins/com.tibco.hawk.microagent.amx.common_1.3.9.001.jar</path>
<TIBCO_HOME>/components/shared/1.0.0/plugins/com.tibco.hawk.microagent.amx.hpa_1.3.9.001.jar</path>
<TIBCO_HOME>/components/shared/1.0.0/plugins/com.tibco.hawk.microagent.amx.service_1.3.9.002.jar</path>
</classpath>

The old JAR versions, which were previously used in the hawkamxhpa-Admin-amxadmin-AdminHost.hma files.

<classpath>
<TIBCO_HOME>/components/shared/1.0.0/plugins/com.tibco.hawk.microagent.amx.common_1.3.8.001.jar</path>
<TIBCO_HOME>components/shared/1.0.0/plugins/com.tibco.hawk.microagent.amx.hpa_1.3.8.001.jar</path>
<TIBCO_HOME>/components/shared/1.0.0/plugins/com.tibco.hawk.microagent.amx.service_1.3.8.001.jar</path>
</classpath>

Issue/Introduction

Hawk Agent throws a ClassNotFoundException after configuring an AMX microagent.