Bug 728965 - CLI: Division by zero in TabularWriter.print()
Summary: CLI: Division by zero in TabularWriter.print()
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 3.0.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-08 13:58 UTC by Ondřej Žižka
Modified: 2011-10-06 18:45 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Ondřej Žižka 2011-08-08 13:58:42 UTC
rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ var criteria = new ResourceCriteria();

rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ criteria.addFilterInventoryStatus( InventoryStatus.COMMITTED );

rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ criteria.addFilterResourceCategory( ResourceCategory.PLATFORM );

rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ criteria.addFilterResourceTypeName("Linux");

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

rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ println("Uninventorizing Linux: " + linuxesList.get(0) );
Uninventorizing Linux: Resource[id=10701, type=Linux, key=stacks2.mw.lab.eng.bos.redhat.com, name=stacks2.mw.lab.eng.bos.redhat.com, parent=<null>, version=Linux 2.6.32-131.0.15.el6.i686]

rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$
rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ ResourceManager.uninventoryResources( [linuxesList.get(0)] );
sun.org.mozilla.javascript.internal.EvaluatorException: Cannot convert sun.org.mozilla.javascript.internal.NativeArray@1389b3f to int[]
ResourceManager.uninventoryResources( [linuxesList.get(0)] );
^

rhqadmin@stacks1.mw.lab.eng.bos.redhat.com:7080$ ResourceManager.uninventoryResources( [linuxesList.get(0).id] );
java.lang.ArithmeticException: / by zero
        at org.rhq.enterprise.client.TabularWriter.print(TabularWriter.java:555)
        at org.rhq.enterprise.client.TabularWriter.print(TabularWriter.java:343)
        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)


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