Bug 784361 - ResourceManager NullPointerException using autoImport.js
Summary: ResourceManager NullPointerException using autoImport.js
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: ---
: JON 3.0.1
Assignee: Larry O'Leary
QA Contact: Mike Foley
: 781867 784628 (view as bug list)
Depends On: 766574
Blocks: jon310-sprint11, rhq44-sprint11 785899 786577 806590 808636 910832
TreeView+ depends on / blocked
Reported: 2012-01-24 17:25 UTC by Charles Crouch
Modified: 2018-11-29 19:24 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 766574
Last Closed: 2013-03-14 15:06:32 UTC

Attachments (Terms of Use)

Comment 1 Charles Crouch 2012-01-24 17:26:26 UTC
This fix needs to be backported to the jon3.0.1 branch of the RHQ repo, checked by engineering, then set to ON-QA

Comment 2 Charles Crouch 2012-01-24 17:32:01 UTC
*** Bug 781867 has been marked as a duplicate of this bug. ***

Comment 3 Larry O'Leary 2012-01-30 20:01:09 UTC
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();

Actual Result:

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

Comment 4 Larry O'Leary 2012-01-30 22:22:10 UTC
First issue (NPE) committed to release/jon3.0.x branch as

Second issue (remote not bound) committed to release/jon3.0.x branch as

Comment 5 Ian Springer 2012-02-01 16:22:41 UTC
*** Bug 784628 has been marked as a duplicate of this bug. ***

Comment 6 Mike Foley 2012-02-02 19:11:55 UTC
Testcase #1

rhqadmin@localhost:7080$  var criteria = ResourceCriteria();                    

rhqadmin@localhost:7080$ criteria.addFilterInventoryStatus(InventoryStatus.NEW);

rhqadmin@localhost:7080$ ResourceManager.findResourcesByCriteria(criteria);     
one row
	                 id: 10101
	               name: RHQ Agent
	            version: 4.2.0.JON.3.0.1.GA
	currentAvailability: ?
	       resourceType: RHQ Agent


Comment 7 Mike Foley 2012-02-02 19:13:55 UTC
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]$

Note You need to log in before you can comment on or make changes to this bug.