Bug 785000 - JON 3.0.1 RC#1 CLI Doc example 2.7 echo_args.js does not work
JON 3.0.1 RC#1 CLI Doc example 2.7 echo_args.js does not work
Product: RHQ Project
Classification: Other
Component: Documentation (Show other bugs)
Unspecified Unspecified
high Severity high (vote)
: ---
: JON 3.0.1
Assigned To: Deon Ballard
Mike Foley
Depends On:
Blocks: jon310-sprint11/rhq44-sprint11
  Show dependency treegraph
Reported: 2012-01-26 16:23 EST by Mike Foley
Modified: 2012-06-21 19:15 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-21 19:15:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
echo_args.js (132 bytes, text/javascript)
2012-01-26 16:23 EST, Mike Foley
no flags Details

  None (edit)
Description Mike Foley 2012-01-26 16:23:24 EST
Created attachment 557743 [details]

Description of problem:  JON 3.0.1 RC#1  CLI Doc example 2.7 echo_args.js does not work

Version-Release number of selected component (if applicable):  JON 3.01 RC#1

How reproducible:  100%

Steps to Reproduce:
1.  follow the doc example 
2.  ./rhq-cli.sh -u rhqadmin -p rhqadmin 
3.  exec -f echo_args.js --args-style=named x=1, y=2
Actual results:
rhqadmin@localhost:7080$ exec -f echo_args.js --args-style=named x=1, y=2
sun.org.mozilla.javascript.EvaluatorException: missing ) after argument list (<Unknown source>#2) in <Unknown source> at line number 2

Expected results: working doc example

Additional info:
Comment 1 Mike Foley 2012-01-30 11:25:46 EST
12/30/2012 BZ triage meeting mfoley, ccrouch, loleary, asantos
Comment 2 Deon Ballard 2012-02-08 11:59:49 EST
I think the error was identified in bug 784887. I made the fix Marco specified and the script worked. 

One thing, is that -f apparently requires an absolute path to the script, not a relative path. So -f echo_args.js won't work, even if it is in the same directory as the rhq-cli.sh script. -f /path/to/echo_args.js does work. 

I'll update the docs for that.
Comment 4 Deon Ballard 2012-06-21 19:15:55 EDT

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