Bug 784903 - JON 3.0.1 RC#1: executing CLI doc example 7.2.6 gives error
Summary: JON 3.0.1 RC#1: executing CLI doc example 7.2.6 gives error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Documentation
Version: 3.0.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: JON 3.0.1
Assignee: Deon Ballard
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon310-sprint11, rhq44-sprint11
TreeView+ depends on / blocked
 
Reported: 2012-01-26 15:42 UTC by Mike Foley
Modified: 2012-06-21 23:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-21 23:14:44 UTC
Embargoed:


Attachments (Terms of Use)
CLI Doc example 7.2.6 (440 bytes, text/javascript)
2012-01-26 15:42 UTC, Mike Foley
no flags Details

Description Mike Foley 2012-01-26 15:42:15 UTC
Created attachment 557694 [details]
CLI Doc example 7.2.6

Description of problem:   executing CLI doc example 7.2.6 gives error


Version-Release number of selected component (if applicable):  JON 3.01 RC1


How reproducible:100%



mfoley@foleymonsterbox1 bin]$ ./rhq-cli.sh -u rhqadmin -p rhqadmin -f myCLIscript2.js 
Remote server version is: 3.0.1.GA (784c8ce:5cde182)
Login successful
Scanning all RHQ Agent instances
Exception in thread "main" org.rhq.enterprise.client.script.CLIScriptException: javax.script.ScriptException: sun.org.mozilla.javascript.EcmaError: ReferenceError: "agents" is not defined. (<Unknown source>#10) in <Unknown source> at line number 10
	at org.rhq.enterprise.client.commands.ScriptCommand.executeScriptFile(ScriptCommand.java:270)
	at org.rhq.enterprise.client.commands.ScriptCommand.execute(ScriptCommand.java:101)
	at org.rhq.enterprise.client.ClientMain.processArguments(ClientMain.java:519)
	at org.rhq.enterprise.client.ClientMain.main(ClientMain.java:106)
Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.EcmaError: ReferenceError: "agents" is not defined. (<Unknown source>#10) in <Unknown source> at line number 10
	at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:133)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
	at org.rhq.enterprise.client.commands.ScriptCommand.executeScriptFile(ScriptCommand.java:259)
	... 3 more
Caused by: sun.org.mozilla.javascript.EcmaError: ReferenceError: "agents" is not defined. (<Unknown source>#10)
	at sun.org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
	at sun.org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
	at sun.org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3717)
	at sun.org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1692)
	at sun.org.mozilla.javascript.gen.c299._c0(<Unknown source>:10)
	at sun.org.mozilla.javascript.gen.c299.call(<Unknown source>)
	at sun.org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
	at sun.org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
	at sun.org.mozilla.javascript.gen.c299.call(<Unknown source>)
	at sun.org.mozilla.javascript.gen.c299.exec(<Unknown source>)
	at sun.org.mozilla.javascript.Context.evaluateReader(Context.java:1135)
	at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:123)
	... 5 more

Comment 1 Mike Foley 2012-01-30 16:26:12 UTC
12/30/2012 BZ triage meeting mfoley, ccrouch, loleary, asantos

Comment 2 Jay Shaughnessy 2012-01-31 22:22:54 UTC
looks like it needs a decl for the 'agents' variable:

+  var agents = new Array();
   var idx=0;

Comment 3 Ian Springer 2012-02-01 16:28:23 UTC
Reassigning to Deon so she can add the missing line to the script in the docs.

Comment 5 Deon Ballard 2012-06-21 23:14:44 UTC
Closing.


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