Bug 1444901

Summary: Adding alert notification on group/dynagroup alert or in alert definition template fails with the message "Failure in datasource while processing FETCH request"
Product: [Other] RHQ Project Reporter: bkramer <bkramer>
Component: Core ServerAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.12CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1444899    

Description bkramer 2017-04-24 14:08:32 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):
RHQ 4.12

How reproducible:
Always

Steps to Reproduce:
1. Install and start RHQ 4.12
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: