This fix needs to be backported to the jon3.0.1 branch of the RHQ repo, checked by engineering, then set to ON-QA
*** Bug 781867 has been marked as a duplicate of this bug. ***
There are two issues included in this bug. For testing: #. Install JON server/agent and register agent with JON but DO NOT import platform, agent, etc into inventory #. Start JON system as normal #. Using CLI: ./rhq-cli.sh -u rhqadmin -p rhqadmin -s localhost -t 7080 var criteria = ResourceCriteria(); criteria.addFilterInventoryStatus(InventoryStatus.NEW); ResourceManager.findResourcesByCriteria(criteria); Actual Result: java.lang.NullPointerException Expected Result: No NPE and a table of the resources that have not yet been imported into inventory (platform, agent, etc) #. Save attachment 545664 [details] for use with the CLI #. Using CLI: ./rhq-cli.sh -u rhqadmin -p rhqadmin -s localhost -t 7080 -f "<path to attachment 545664 [details]>" Actual Result: javax.naming.NameNotFoundException: remote not bound Expected Result: No error and NEW (uncommitted) resources get imported into JON inventory
First issue (NPE) committed to release/jon3.0.x branch as http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=99ff4f9c796c171b74c3e09b404a2c397607a698 Second issue (remote not bound) committed to release/jon3.0.x branch as http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=a4602636483a6c8a3093dd16e16c97498286bba9
*** Bug 784628 has been marked as a duplicate of this bug. ***
Testcase #1 rhqadmin@localhost:7080$ var criteria = ResourceCriteria(); rhqadmin@localhost:7080$ criteria.addFilterInventoryStatus(InventoryStatus.NEW); rhqadmin@localhost:7080$ ResourceManager.findResourcesByCriteria(criteria); one row Resource: id: 10101 name: RHQ Agent version: 4.2.0.JON.3.0.1.GA currentAvailability: ? resourceType: RHQ Agent rhqadmin@localhost:7080$
testcase #2 [mfoley@foleymonsterbox1 bin]$ ./rhq-cli.sh -u rhqadmin -p rhqadmin -f /home/mfoley/CLI/JON301/rhq-remoting-cli-4.2.0.JON.3.0.1.GA/bin/autoImport.js Remote server version is: 3.0.1.GA (b2cb23b:859b914) Login successful Remote server version is: 3.0.1.GA (b2cb23b:859b914) Running autoImport.js Found resources to import: RHQ Agent [mfoley@foleymonsterbox1 bin]$