Bug 1444899 - Failure in datasource while processing FETCH request when adding notification to resource group alert definition or to alert definition template
Summary: Failure in datasource while processing FETCH request when adding notification...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.3.8
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: DR01
: JON 3.3.9
Assignee: Michael Burman
QA Contact: Filip Brychta
URL:
Whiteboard:
Depends On: 1444901
Blocks: 1448577
TreeView+ depends on / blocked
 
Reported: 2017-04-24 14:06 UTC by bkramer
Modified: 2020-09-10 10:30 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
: 1448577 (view as bug list)
Environment:
Last Closed: 2017-10-02 17:21:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1382649 0 high CLOSED Attempt to add notification for the second alert definition in UI throws message "Failed to get notification configurati... 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 3011031 0 None None None 2017-04-27 17:02:54 UTC
Red Hat Product Errata RHEA-2017:2846 0 normal SHIPPED_LIVE Red Hat JBoss Operations Network 3.3.9 bug fix update 2017-10-02 21:21:28 UTC

Internal Links: 1382649

Description bkramer 2017-04-24 14:06:12 UTC
Description of problem:
Attempt to add alert notification on the alert defined for group/dynagroup or in alert definition template fails with the message "Failure in datasource while processing FETCH request" in the Message Center. At the same time, no error is logged in the server.log file in DEBUG mode. 

Version-Release number of selected component (if applicable):
JBoss ON 3.3.8

How reproducible:
Always

Steps to Reproduce:
1. Install and start JBoss ON 3.3.8
2. Create a group or dynagroup;
3. Create new alert, add a condition and try to add notification;


Actual results:
An error message is shown in the top right corner "Failure in datasource while processing FETCH request" and the full message in the Message Center is:

*******************************
Message :	Failure in datasource while processing FETCH request.
Severity :	Error
Time :	        Monday, April 24, 2017 2:43:58 PM UTC+1
Root Cause :	(TypeError) : Cannot read property 'alertDefinitions' of null
Detail :	com.google.gwt.core.client.JavaScriptException:(TypeError) : Cannot read property 'alertDefinitions' of null
--- STACK TRACE FOLLOWS ---
(TypeError) : Cannot read property 'alertDefinitions' of null
   at Unknown.$getAlertDefinitions(<anonymous>@19)
   at Unknown.$prepareNotificationsForPreview(<anonymous>@5)
   at Unknown.$executeFetch_14(<anonymous>@12)
   at Unknown.executeFetch_19(<anonymous>@3)
   at Unknown.transformRequest_0(<anonymous>@14)
   at Unknown.<anonymous>(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/F1161466392381594EBFA19C65D6BFBD.cache.html@21)
   at Unknown.apply(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/F1161466392381594EBFA19C65D6BFBD.cache.html@21)
   at Unknown.entry0(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/F1161466392381594EBFA19C65D6BFBD.cache.html@16)
   at Unknown.transformRequest(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/F1161466392381594EBFA19C65D6BFBD.cache.html@14)
   at Unknown.isc_DataSource_getServiceInputs(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/sc/modules/ISC_DataBinding.js@13)
   at Unknown.isc_DataSource_sendDSRequest(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/sc/modules/ISC_DataBinding.js@13)
   at Unknown.isc_DataSource_performDSOperation(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/sc/modules/ISC_DataBinding.js@13)
   at Unknown.isc_DataSource_fetchData(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/sc/modules/ISC_DataBinding.js@67)
   at Unknown.isc_ResultSet_fetchRemoteData(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/sc/modules/ISC_DataBinding.js@68)
   at Unknown.isc_ResultSet__fetchRemoteData(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/sc/modules/ISC_DataBinding.js@270)
   at Unknown.isc_c_Class_fireCallback(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/sc/modules/ISC_Core.js@49)
   at Unknown.isc_c_Class__fireActionsOnPause(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/sc/modules/ISC_Core.js@198)
   at Unknown.isc_c_Class_fireCallback(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/sc/modules/ISC_Core.js@78)
   at Unknown.isc_c_Timer__fireTimeout(http://biljana.usersys.redhat.com:7080/coregui/org.rhq.coregui.CoreGUI/sc/modules/ISC_Core.js@81)
   at Unknown.anonymous(<anonymous>@11)
*******************************
The notification is not added.

Expected results:
No error is thrown and notification is properly created/added.

Additional info:
This worked fine in JBoss ON 3.3.7
Severity is set to "high" as the only way to add notification to the alert is to do that per resource. However, this is not viable solution for customers with the big number of resources.

Comment 1 dsteigne 2017-04-27 17:01:51 UTC
Received the same message but with a different stack trace when trying to add a notification to Alert Template:

Message : Failure in datasource while processing FETCH request.
Severity : Error
	
Time :	Thursday, April 27, 2017 11:54:36 AM UTC-5
Root Cause :	(TypeError) : this$static is null
Detail :	

com.google.gwt.core.client.JavaScriptException:(TypeError) : this$static is null
--- STACK TRACE FOLLOWS ---
(TypeError) : this$static is null
   at Unknown.$getAlertDefinitions(Unknown Source)
   at Unknown.$prepareNotificationsForPreview(Unknown Source)
   at Unknown.$executeFetch_14(Unknown Source)
   at Unknown.executeFetch_19(Unknown Source)
   at Unknown.transformRequest_0(Unknown Source)
   at Unknown.onInit_0/self_0.transformRequest<(Unknown Source)
   at Unknown.apply(Unknown Source)
   at Unknown.entry0(Unknown Source)
   at Unknown.entry_0/<(Unknown Source)
   at Unknown.isc_DataSource_getServiceInputs(Unknown Source)
   at Unknown.isc_DataSource_sendDSRequest(Unknown Source)
   at Unknown.isc_DataSource_performDSOperation(Unknown Source)
   at Unknown.isc_DataSource_fetchData(Unknown Source)
   at Unknown.isc_ResultSet_fetchRemoteData(Unknown Source)
   at Unknown.isc_ResultSet__fetchRemoteData(Unknown Source)
   at Unknown.isc_c_Class_fireCallback(Unknown Source)
   at Unknown.isc_c_Class__fireActionsOnPause(Unknown Source)
   at Unknown.isc_c_Class_fireCallback(Unknown Source)
   at Unknown.isc_c_Timer__fireTimeout(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.anonymous(Unknown Source)

Comment 2 Michael Burman 2017-04-28 10:07:28 UTC
This happens because the BZ 1382649 fix is accessing the AlertDefinition's Resource and cleaning it to prevent that issue.

However, with the Group, there's no backing resource and the NPE comes from that. 
This begs the question - does the original fix for BZ 1382649 work correctly? It prevents the issue happening in resource scenarios, but will that error still happen with group resources? I quickly tested and found out that I can add succesfully two alert definitions to the same group definition - but that test doesn't cover all the scenarios. 

Rubens, can you verify if the original BZ 1382649 fix worked for group scenarios also? Otherwise, this commit will fix the issue by just checking if there's a backing resource before trying to do any operations to it.

In the master:

commit b66a2cec89d8a6dde5c32d4f850747bb73f8c9d5
Author: Michael Burman <miburman>
Date:   Fri Apr 28 13:04:35 2017 +0300

    [BZ 1444899] Resource is not available when modifying group alert notifications

Comment 3 Ruben Vargas Palma 2017-05-02 15:47:31 UTC
I tested this fix on groups and dygroups and it worked correctly, the original fix for BZ 1382649 worked also.

Comment 5 Ruben Vargas Palma 2017-05-04 12:25:44 UTC
Sorry for the confusion, I'm saying that this fix combined with the fix for BZ 1382649 and the test case for groups scenarios works.

Comment 7 Simeon Pinder 2017-09-01 15:34:08 UTC
Moving to ON_QA as available for test with the following binary:
http://download.eng.bos.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/133/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip

*NOTE Build represents JON 3.3.9 DR01 build.

Please report issues as you encounter them.

Comment 10 errata-xmlrpc 2017-10-02 17:21:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:2846


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