Red Hat Bugzilla – Bug 809422
Services Management - Invalid parameters lead to methods failing with exceptions
Last modified: 2015-01-05 20:30:41 EST
Description of problem:
Methods in "templatestatistics" and "portalcontroller" section of the Services Management gadget fail with exception (NPE/MalformedURLException) if they are called with an invalid parameter. The exception is visible in the server log, but in the UI, you only see the message "Method's executed, return no result", which might be a bit confusing.
For example methods "reloadConfiguration" without a parameter and "loadConfiguration" called with an invalid path both lead to the same message being shown in the gadget, whereas only one of them really failed with exception.
Steps to Reproduce:
1. Sign in as "root".
2. Go to "Group" > "Administration" > "Services Management".
3. Switch to e.g. "templatestatistics".
4. Hit "Run" next to any of the methods.
Exception is logged, message "Method's executed, return no result" is displayed.
It would be nice to have these two situations (failure/no return value) distinguished in a consistent way (methods in other sections don't log an exception and usually return at least some value).
Created attachment 574817 [details]
Extract from the server log produced by loadConfiguration method.
Created attachment 574818 [details]
Extract from the server log produced by a get method in templatestatistics section.
This could be a candidate for an Enhancement Release Note as it improves the way the log messages are recorded. Setting Flag to ? and provided draft release notes.
Nicolas agreed to fix this in WS. Fixing in WS means that it is too late for JBoss Portal 6.1.1.
I improved the pull request in upstream in accordance with the proposal of Nicolas Filotto.
The propagation of errors to the client is fixed in org.exoplatform.management.data.RestResource through making the methods return RestResource rather than Object.
Further, I have added parameter checks throwinf IllegalArgumentException on "id empty" and "object with the given id does not exist" in following methods:
I'm setting the Release Note aspect of this issue to ?
This is so a release note is not included for this issue prematurely before the issue is resolved.
Set needinfo to aakanksha or I if this issue passes QE before 6.1.1 is released, and we'll set the flag so the release note is included.
Verified with 6.1.1.CR1.