Bug 1105743 - Viewing operation details for operations with no results causes Globally uncaught exception in UI - java.lang.IllegalArgumentException:Null configuration.
Summary: Viewing operation details for operations with no results causes Globally unca...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Operations, Storage Node
Version: JON 3.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER01
: JON 3.2.3
Assignee: Jirka Kremser
QA Contact: Sunil Kondkar
URL:
Whiteboard:
Depends On: 1103375
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-07 00:08 UTC by Larry O'Leary
Modified: 2018-12-06 16:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-05 15:40:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1105742 0 unspecified CLOSED Storage node can get stuck in MAINTENANCE mode if cluster maintenance is executed when one or more agents are unavailabl... 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 967583 0 None None None Never

Internal Links: 1105742

Description Larry O'Leary 2014-06-07 00:08:57 UTC
When investigating bug 1105742, following the failed operation link from the storage node topology administration page, the operation history page is displayed but reports a "Globally uncaught exception" with the following stack:

java.lang.IllegalArgumentException:Null configuration.
--- STACK TRACE FOLLOWS ---
Null configuration.
   at Unknown.Throwable_1(Unknown Source)
   at Unknown.Exception_1(Unknown Source)
   at Unknown.RuntimeException_1(Unknown Source)
   at Unknown.IllegalArgumentException_1(Unknown Source)
   at Unknown.ConfigurationEditor_1(Unknown Source)
   at Unknown.$buildResultsSection_0(Unknown Source)
   at Unknown.buildResultsSection_0(Unknown Source)
   at Unknown.$displayDetails(Unknown Source)
   at Unknown.$onSuccess_443(Unknown Source)
   at Unknown.onSuccess_456(Unknown Source)
   at Unknown.$onResponseReceived(Unknown Source)
   at Unknown.onResponseReceived_6(Unknown Source)
   at Unknown.$fireOnResponseReceived(Unknown Source)
   at Unknown.onReadyStateChange_0(Unknown Source)
   at Unknown.$setOnReadyStateChange/this$static.onreadystatechange<(Unknown Source)
   at Unknown.apply(Unknown Source)
   at Unknown.entry0(Unknown Source)
   at Unknown.entry_0/<(Unknown Source)
   at Unknown.anonymous(Unknown Source)


Version-Release number of selected component (if applicable):
3.2.1

How reproducible:
Always

Steps to Reproduce:
1.  Install and start JBoss ON 3.2 system.
2.  Install a second agent and storage node.
3.  Verify that both storage nodes are in inventory and are UP/NORMAL.
4.  Shutdown one of the agents.
5.  Invoke the following JBoss ON CLI command:

        ./rhq-cli.sh -u rhqadmin -p rhqadmin -c 'StorageNodeManager.runClusterMaintenance()'

6.  View storage node's topology administration details page.
7.  Click the "Repair" link in the "Operation" feild.

Actual results:
Operation history page is displayed but red banner appears at top of UI indicating "Globally uncaught exception" with the stack similar to the above.

Expected results:
No error or exception displayed/logged.

Comment 1 John Sanda 2014-06-10 02:35:30 UTC
Jirka, Would you mind taking a look at this? If you are not able to, just go ahead and reassign it back to me. Thanks.

Comment 2 Jirka Kremser 2014-06-20 14:15:52 UTC
Reproduced here http://jk-bz1105743-1.bc.jonqe.lab.eng.bos.redhat.com:7080/coregui/#Resource/10093/Operations/History/10005 on JON 3.2.0 GA

This was already fixed in master by bug 1103375

The bug is targeted to 3.3 that will be based on master, so lets wait for the fork (=> leaving it on ASSIGNED)

Here is a patch if needed, for hotfix (added 1 null check for operationHistory.getResults())


diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryDetailsView.java b/modu
index 1264343..6b8dd08 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryDetailsView.java
@@ -27,6 +27,7 @@ import com.smartgwt.client.widgets.Label;
 import com.smartgwt.client.widgets.form.fields.FormItem;
 import com.smartgwt.client.widgets.form.fields.StaticTextItem;
 
+import org.rhq.core.domain.configuration.Configuration;
 import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
 import org.rhq.core.domain.criteria.ResourceOperationHistoryCriteria;
 import org.rhq.core.domain.operation.GroupOperationHistory;
@@ -137,11 +138,11 @@ public class ResourceOperationHistoryDetailsView extends AbstractOperationHistor
             OperationDefinition operationDefinition = operationHistory.getOperationDefinition();
             ConfigurationDefinition resultsConfigurationDefinition = operationDefinition
                 .getResultsConfigurationDefinition();
-            if (resultsConfigurationDefinition != null
-                && !resultsConfigurationDefinition.getPropertyDefinitions().isEmpty()
-                && operationHistory.getResults() != null) {
-                ConfigurationEditor editor = new ConfigurationEditor(
-                    operationDefinition.getResultsConfigurationDefinition(), operationHistory.getResults());
+            Configuration results = operationHistory.getResults();
+            if (resultsConfigurationDefinition != null && results != null
+                && !resultsConfigurationDefinition.getPropertyDefinitions().isEmpty()) {
+
+                ConfigurationEditor editor = new ConfigurationEditor(resultsConfigurationDefinition, results);
                 editor.setPreserveTextFormatting(true);
                 editor.setReadOnly(true);
                 resultsSection.addMember(editor);

Comment 3 Jirka Kremser 2014-06-25 12:34:37 UTC
branch:  release/jon3.2.x
link:    https://github.com/rhq-project/rhq/commit/ff3591dec
time:    2014-06-25 14:31:41 +0200
commit:  ff3591dec255c9a5357fdc45b742b7af6365840b
author:  Jay Shaughnessy - jshaughn
message: [BZ 1105743] - Viewing operation details for operations with no results
         causes Globally uncaught exception in UI -
         java.lang.IllegalArgumentException:Null configuration.
         - BZ 1103375 for RHQ
         - Handled cases where null results are returned from an
         operation excecution.
         - Fixed one op history update path where [results] data could
         be lost.

         (cherry picked from commit
         ed8a2c4ce29920559febbd23129db6d9afa77d99) Signed-off-by: Jirka
         Kremser <jkremser>

         Conflicts:
         modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/admin/topology/AgentDetailView.java

Comment 4 Simeon Pinder 2014-08-15 03:19:16 UTC
Moving to ON_QA as this is available for test in JON 3.2.3 ER01 build:

http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/3.2.3.GA/8-14-14/

Comment 5 Sunil Kondkar 2014-08-19 11:47:27 UTC
Verified on version : 3.2.0.GA Update 03 Build Number :bca1bc8:e19c43d

Verified that there is no error/exception on clicking the operation link for the operation where no result is returned


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