JON remote API getBundleFiles() returns null when criteria fetchBundleFiles is not explicitly set to true
Issue
-
When invoking bundle.getBundleVersions().get(0).getBundleFiles().size() the following exception is thrown:
Exception in thread "main" org.rhq.enterprise.client.script.CLIScriptException: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot call method "size" of null (<Unknown source>#53) in <Unknown source> at line number 53 at org.rhq.enterprise.client.commands.ScriptCommand.executeScriptFile(ScriptCommand.java:270) at org.rhq.enterprise.client.commands.ScriptCommand.execute(ScriptCommand.java:101) at org.rhq.enterprise.client.ClientMain.processArguments(ClientMain.java:519) at org.rhq.enterprise.client.ClientMain.main(ClientMain.java:106) Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot call method "size" of null (<Unknown source>#53) in <Unknown source> at line number 53 at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:110) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:232) at org.rhq.enterprise.client.commands.ScriptCommand.executeScriptFile(ScriptCommand.java:259) ... 3 more -
getBundleFiles() returns null
- Why do I not get a list of bundle files associated with a bundle version?
Environment
- JBoss Operations Network (JON) 3.0, 3.0.1, 3.1
- JON remote client API
- Retrieving bundle files associated with a bundle version returned from a call to
BundleManagerRemote.findBundlesByCriteria(Subject subject, BundleCriteria criteria)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
