Red Hat Bugzilla – Bug 967601
Full class names (including packages) must be used in server CLI scripts
Last modified: 2013-05-27 10:23:09 EDT
Description of problem:
I have a simple server CLI script:
var resC = new ResourceCriteria();
This script is invoked when the alert is fired and invocation fails with an exception.
However when the full class name is used:
var resC= new org.rhq.core.domain.criteria.ResourceCriteria();
script works correctly.
Version-Release number of selected component (if applicable):
Build Number: ff37cd9
Steps to Reproduce:
1. create an alarm definition with notification on some resource (i.e. platform)
a. go to Alerts->Definitions->New
b. fill some name
c. add a condition - i.e. when some operation is invoked
d. add a notification - choose a CLI script as a notification sender->upload the file (js file containing just var resC = new ResourceCriteria();)
e. save the alert definition
2. invoke the operation from step c.
3. go to Alerts->History
4. open relevant alert and check notification tab
Ran script script.js in version rhqadmin:1.18 from repo First as user rhqadmin.
<unknown source=""> at line number 1 in script script.js (rhqadmin:1.18) in repo First at line number 1</unknown>
no problems when using a CLI client