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): Version: 4.4.0-SNAPSHOT Build Number: ca5eecb How reproducible: Always 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 Actual results: see attached output.txt Expected results: output of pretty.print(childResources) should not be empty Additional info: 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); pretty.print(hist) is empty. Workaround for this is: for(i=0;i<hist.size();i++){ pretty.print(hist.get(i)); }
I tracked this down and eventually found the root cause. I can't really explain it, must be a subtle issue with I/O. commit 9eb9b7d8837736f0742eacf2151afb700733a2a9 Author: Jay Shaughnessy <jshaughn> 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.
Verified on Version: 4.10.0-SNAPSHOT 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.