Red Hat Bugzilla – Bug 814579
pretty.print failed to print output in non-interactive mode
Last modified: 2014-04-23 08:29:28 EDT
Description of problem:
pretty.print(childResources); failed to print output however print(childResources); works correctly. See attached test.js
Version-Release number of selected component (if applicable):
Build Number: ca5eecb
Steps to Reproduce:
1. import Linux platform resource with all child resources to your inventory
2. run ./rhq-cli.sh -u rhqadmin -p rhqadmin -f test.js > output.txt
see attached output.txt
output of pretty.print(childResources) should not be empty
test.js and output.txt attached
It seems that pretty.print fails with set of resources, for single resource works correctly.
Created attachment 578884 [details]
contains test.js and output.txt
Investigate for easy/hard this would be to address
setting priority to medium per BZ triage 4/23 (crouch, santos, oleary, foley)
I run into this again today.
pretty.print failed to print PageList<ResourceOperationHistory> so the output of following code:
var resOpHistCri = new ResourceOperationHistoryCriteria();
var hist = OperationManager.findResourceOperationHistoriesByCriteria(resOpHistCri);
Workaround for this is:
I tracked this down and eventually found the root cause. I can't really explain it, must be a subtle issue with I/O.
Author: Jay Shaughnessy <firstname.lastname@example.org>
Date: Tue Oct 15 17:17:29 2013 -0400
Very strange issue. Replace out.print("\n") with out.println() calls
seems to solve the problem.
Build Number: 9eb9b7d
Bulk closing of 4.10 issues.
If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.