Bug 784678 - JON 3.0.1 RC#1: Error executing CLI Doc example for 'record' command
JON 3.0.1 RC#1: Error executing CLI Doc example for 'record' command
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
3.0.1
Unspecified Unspecified
high Severity high (vote)
: ---
: JON 3.0.1
Assigned To: Charles Crouch
Mike Foley
:
Depends On:
Blocks: jon310-sprint11/rhq44-sprint11
  Show dependency treegraph
 
Reported: 2012-01-25 14:26 EST by Mike Foley
Modified: 2015-02-01 18:27 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-03 11:10:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Mike Foley 2012-01-25 14:26:54 EST
Description of problem:  Error executing CLI Doc example


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


How reproducible:
100%


Steps to Reproduce:
1. CLI Doc example from JON doc 2.2.5
2. ./rhq-cli.sh -u rhqadmin -p rhqadmin  
3. record -b myoutfile.txt  
  
Actual results:  Null Pointer Exception (see below)


Expected results:  Doc example works.


Additional info:

[mfoley@foleymonsterbox1 bin]$ ./rhq-cli.sh -u rhqadmin -p rhqadmin 
RHQ - RHQ Enterprise Remote CLI 4.2.0.JON.3.0.1.GA
Remote server version is: 3.0.1.GA (784c8ce:5cde182)
Login successful
rhqadmin@localhost:7080$ record -b myoutfile.txt 
java.lang.NullPointerException
	at java.io.FileOutputStream.<init>(FileOutputStream.java:201)
	at java.io.FileWriter.<init>(FileWriter.java:107)
	at org.rhq.enterprise.client.commands.RecordCommand.startRecording(RecordCommand.java:120)
	at org.rhq.enterprise.client.commands.RecordCommand.execute(RecordCommand.java:55)
	at org.rhq.enterprise.client.ClientMain.executePromptCommand(ClientMain.java:308)
	at org.rhq.enterprise.client.ClientMain$1.run(ClientMain.java:262)
	at java.lang.Thread.run(Thread.java:636)
Comment 1 Mike Foley 2012-01-30 11:26:13 EST
12/30/2012 BZ triage meeting mfoley, ccrouch, loleary, asantos
Comment 2 Ian Springer 2012-01-31 17:17:42 EST
Fixed in master - http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=55a89fa - we now throw a command line parse exception if the -f option is not specified, e.g.:

rhqadmin@localhost:7080$ record -b
org.rhq.enterprise.client.script.CommandLineParseException: The file option must be specified.
	at org.rhq.enterprise.client.commands.RecordCommand.parseArgs(RecordCommand.java:100)
	at org.rhq.enterprise.client.commands.RecordCommand.execute(RecordCommand.java:47)
	at org.rhq.enterprise.client.ClientMain.executePromptCommand(ClientMain.java:288)
	at org.rhq.enterprise.client.ClientMain$1.run(ClientMain.java:242)
	at java.lang.Thread.run(Thread.java:662)
Comment 4 Simeon Pinder 2012-02-02 22:27:07 EST
Moving to ON_QA as there is a new binary 3.0.1.GA RC2 available here to test with:
https://brewweb.devel.redhat.com//buildinfo?buildID=197202
Comment 5 Sunil Kondkar 2012-02-03 06:45:00 EST
Verified on 3.0.1.GA RC2 build (Build Number: b2cb23b:859b914)

If the -f option is not specified, it throws a CommandLineParseException: The file option must be specified.

[root@suniltest bin]# ./rhq-cli.sh -u rhqadmin -p rhqadmin
RHQ Enterprise Remote CLI 4.2.0.JON.3.0.1.GA
Remote server version is: 3.0.1.GA (b2cb23b:859b914)
Login successful
rhqadmin@localhost:7080$ record -b myoutfile.txt
org.rhq.enterprise.client.script.CommandLineParseException: The file option must be specified.
	at org.rhq.enterprise.client.commands.RecordCommand.parseArgs(RecordCommand.java:102)
	at org.rhq.enterprise.client.commands.RecordCommand.execute(RecordCommand.java:49)
	at org.rhq.enterprise.client.ClientMain.executePromptCommand(ClientMain.java:309)
	at org.rhq.enterprise.client.ClientMain$1.run(ClientMain.java:263)
	at java.lang.Thread.run(Thread.java:619)
rhqadmin@localhost:7080$ 
----------------------------

Verified that specifying the file option works:
rhqadmin@localhost:7080$ record -b -f myoutfile.txt
Comment 7 Heiko W. Rupp 2013-09-03 11:10:11 EDT
Bulk closing of old issues in VERIFIED state.

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