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.
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)
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
I tested this fix on groups and dygroups and it worked correctly, the original fix for BZ 1382649 worked also.
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.
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.
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