Description of problem: If you enter more than 3 Conditions on an alert, when you try to save you get a NPE. Version-Release number of selected component (if applicable): 2.4 How reproducible: Steps to Reproduce: 1. Open an existing alert, add another condition, save 2. Open the same alert, add another condition, save 3. Open the same alert, add the 4 condition, save, the below error the thrown. Actual results: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.NullPointerException org.rhq.enterprise.gui.legacy.action.resource.common.monitor.alerts.config.condition.ConverterValidatorManager.validate(ConverterValidatorManager.java:102) org.rhq.enterprise.gui.legacy.action.resource.common.monitor.alerts.config.ConditionBean.validate(ConditionBean.java:311) org.rhq.enterprise.gui.legacy.action.resource.common.monitor.alerts.config.DefinitionForm.validate(DefinitionForm.java:666) org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:950) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.rhq.enterprise.gui.legacy.WebUserTrackingFilter.doFilter(WebUserTrackingFilter.java:50) org.rhq.enterprise.gui.legacy.AuthenticationFilter.doFilter(AuthenticationFilter.java:129) org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:124) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs. Expected results: Additional info:
I was able to add more than 3 conditions without problem but got exactly the same exception as reported if I tried to save the alert without filling in the condition after clicking the "Add Another Condition" link. The below commit fixes that issue by showing an error message at the erroneous condition instead of throwing an unhandled exception. commit 82f1c5a794362e72e14f3b3b64170cd75a7c12b1 Author: Lukas Krejci <lkrejci> Date: Thu Nov 18 19:47:23 2010 +0100 BZ 643919 - Unspecified condition (that appears after clicking "Add Another Condition") doesn't cause an exception on alert saving. A proper error message appears instead.
Note that I didn't port this fix to the master branch because of the GUI overhaul that happens there anyway.
QA Verified - I am now able to add 3+ conditions, and per comment #1, was not able to repro the error when neglecting to fill in the conditions.
Bookkeeping - closing bug - fixed in recent release.