Bug 716326 - NPE in ClientMain.main() when calling rhq-cli.sh with --file
NPE in ClientMain.main() when calling rhq-cli.sh with --file
Status: NEW
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
Unspecified Unspecified
medium Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2011-06-23 20:52 EDT by Ondřej Žižka
Modified: 2011-10-07 14:56 EDT (History)
1 user (show)

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

Attachments (Terms of Use)

  None (edit)
Description Ondřej Žižka 2011-06-23 20:52:19 EDT
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-23 20:54:52 EDT
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-23 21:14:21 EDT
-f works.

Something is wrong in CmdLineParser.java.
Comment 3 Ondřej Žižka 2011-06-23 21:17:47 EDT
I don't like getopts.

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