Bug 716326 - NPE in ClientMain.main() when calling rhq-cli.sh with --file
Summary: NPE in ClientMain.main() when calling rhq-cli.sh with --file
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-24 00:52 UTC by Ondřej Žižka
Modified: 2022-03-31 04:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Ondřej Žižka 2011-06-24 00:52:19 UTC
ondra@ondra-redhat: ~/work/JON/SVN-QA $ rhq-cli/bin/rhq-cli.sh -u rhqadmin -p rhqadmin --host $RHQ_HOST  --file
export JAVA_HOME=/home/ondra/sw/tools/jdk/sun160
Remote server version is: 3.0.1.GA(81e26be20d)
Login successful
Exception in thread "main" java.lang.NullPointerException
        at java.io.File.<init>(File.java:222)
        at org.rhq.enterprise.client.commands.ScriptCommand.bindScriptArgs(ScriptCommand.java:288)
        at org.rhq.enterprise.client.commands.ScriptCommand.execute(ScriptCommand.java:121)
        at org.rhq.enterprise.client.ClientMain.processArguments(ClientMain.java:505)
        at org.rhq.enterprise.client.ClientMain.main(ClientMain.java:106)
ondra@ondra-redhat: ~/work/JON/SVN-QA $

Comment 1 Ondřej Žižka 2011-06-24 00:54:52 UTC
Does the same with

touch x
~/work/JON/SVN-QA $ rhq-cli/bin/rhq-cli.sh -u rhqadmin -p
rhqadmin --host $RHQ_HOST  --file x

Comment 2 Ondřej Žižka 2011-06-24 01:14:21 UTC
-f works.

Something is wrong in CmdLineParser.java.

Comment 3 Ondřej Žižka 2011-06-24 01:17:47 UTC
I don't like getopts.


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