Bug 784678 - JON 3.0.1 RC#1: Error executing CLI Doc example for 'record' command
Summary: JON 3.0.1 RC#1: Error executing CLI Doc example for 'record' command
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 3.0.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: JON 3.0.1
Assignee: Charles Crouch
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon310-sprint11, rhq44-sprint11
TreeView+ depends on / blocked
 
Reported: 2012-01-25 19:26 UTC by Mike Foley
Modified: 2015-02-01 23:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-03 15:10:11 UTC
Embargoed:


Attachments (Terms of Use)

Description Mike Foley 2012-01-25 19:26:54 UTC
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 16:26:13 UTC
12/30/2012 BZ triage meeting mfoley, ccrouch, loleary, asantos

Comment 2 Ian Springer 2012-01-31 22:17:42 UTC
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-03 03:27:07 UTC
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 11:45:00 UTC
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 15:10:11 UTC
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.