cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Machine Agent Command Watcher Extension - Unable to make an SQL call

Dale.Chapman
Maker

I have been trying to find or create a way to monitor an Oracle SQL query for elapsed time. I decided to try to use the Command Watcher extension on the Machine Agent for Linux.  I have created a small Java program that takes the system time at the start, opens a connection, runs the query, retrieves the first row of the result set, calculates the elapsed time of the program and then returns that value using an exit() call. 
When I run the program in a linux shell, it functions perfectly. When I configure the Command Watcher to execute the Java program, I consistently receive a "NoClassDefFoundError" when attempting to load java.sql.Date. I have tried to manipulate the classpath to include the rt.jar file directly and still encounter the error. 
Is either the CommandWatcher, or the machine agent in which it runs, configured in such a way as to prevent the use of java.sql package? If so, how can I get around this? If not, what am I missing when attempting to run this program inside of the CommandWatcher?

 

Dale

2 REPLIES 2

Dale.Chapman
Maker

I contacted AppDynamics support about this and apparently the problem is that the CommandWatcher extension is not currently supported on the latest (21.5.x) generation of the machine agent.
The fix is to use an older machine agent.

 

Thanks to everyone who read my question.

Jeanie.Kedia
AppDynamics Team (Retired)

Thanks for reporting back your findings to the community @Dale.Chapman! This is helpful to know.