Bug 722601 - CLI: NPE in org.rhq.enterprise.client.TabularWriter.shortVersion()
CLI: NPE in org.rhq.enterprise.client.TabularWriter.shortVersion()
Status: NEW
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
3.0.1
Unspecified Unspecified
medium Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-15 15:46 EDT by Ondřej Žižka
Modified: 2013-11-24 04:18 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 Ondřej Žižka 2011-07-15 15:46:32 EDT
Using empty criteria results in NPE.

rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$
var criteria = new ResourceCriteria();

rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ ResourceManager.findResourcesByCriteria(criteria)

java.lang.NullPointerException
        at org.rhq.enterprise.client.TabularWriter.shortVersion(TabularWriter.java:674)
        at org.rhq.enterprise.client.TabularWriter.print(TabularWriter.java:337)
        at org.rhq.enterprise.client.TabularWriter.print(TabularWriter.java:123)
        at org.rhq.enterprise.client.commands.ScriptCommand.execute(ScriptCommand.java:177)
        at org.rhq.enterprise.client.ClientMain.executePromptCommand(ClientMain.java:303)
        at org.rhq.enterprise.client.ClientMain$1.run(ClientMain.java:248)
        at java.lang.Thread.run(Thread.java:662)
Comment 1 Ondřej Žižka 2011-07-15 15:46:52 EDT
JON 2.4.1
Comment 2 Ondřej Žižka 2011-07-15 15:54:09 EDT
rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ var x = ResourceManager.findResourcesByCriteria(criteria)

rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ x
java.lang.NullPointerException
        at org.rhq.enterprise.client.TabularWriter.shortVersion(TabularWriter.java:674)
        at org.rhq.enterprise.client.TabularWriter.print(TabularWriter.java:337)
        at org.rhq.enterprise.client.TabularWriter.print(TabularWriter.java:123)
        at org.rhq.enterprise.client.commands.ScriptCommand.execute(ScriptCommand.java:177)
        at org.rhq.enterprise.client.ClientMain.executePromptCommand(ClientMain.java:303)
        at org.rhq.enterprise.client.ClientMain$1.run(ClientMain.java:248)
        at java.lang.Thread.run(Thread.java:662)

rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ " " + x
 PageList[Resource[id=10001, type=Linux, key=dev85.mw.lab.eng.bos.redhat.com, name=dev85.mw.lab.eng.bos.redhat.com, parent=<null>, version=Linux 2.6.32-131.2.1.el6.x86_64], Resource[id=10003, type=JBossAS Server, key=/mnt/hudson_workspace/workspace/JON24-EAP5-integration/eap/server/all, name=dev85.mw.lab.eng.bos.redhat.com:1099 all, parent=dev85.mw.lab.eng.bos.redhat.com, version=5.1.1], Resource[id=10002, type=RHQ Agent, key=RHQ Agent, name=RHQ Agent, parent=dev85.mw.lab.eng.bos.redhat.com, version=3.0.1.GA]

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