The example at https://access.redhat.com/site/documentation/en-US/JBoss_Operations_Network/3.1/html-single/Dev_Writing_JON_Command-Line_Scripts/index.html#Creating_the_JON_Scripts-Getting_inventory_and_status_information_out does not work with JDK, only JDK 7. The code contains "criteria.addFilterExplicitGroupIds(group.id);" and the addFilterExplicitGroupIds() is a vararg method. Support for vararg methods was only added in 1.6R4 and JDK 6 uses 1.6R2 so this will fail with the error "Can't find method org.rhq.core.domain.criteria.ResourceCriteria.addFilterExplicitGroupIds(number)". To do that on JDK 6, you need: criteria = new ResourceCriteria(); var groupArray= new Array(); groupArray[0]=group.id; criteria.addFilterExplicitGroupIds(groupArray);
This is corrected to the JDK 6 example: https://access.redhat.com/site/documentation/en-US/Red_Hat_JBoss_Operations_Network/3.2/html/Writing_JON_Command-Line_Scripts/Control_Grouped_Servers_via_the_CLI.html#Creating_the_JON_Scripts-Getting_inventory_and_status_information_out I left a comment in for the JDK 7 way to do it, in case it should be changed in the future.