Bug 643919 - Entering more than 3 Conditions on an alert gives a NPE
Entering more than 3 Conditions on an alert gives a NPE
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Alerts (Show other bugs)
3.0.0
All All
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Corey Welton
:
Depends On:
Blocks: jon241-bugs jon30-bugs
  Show dependency treegraph
 
Reported: 2010-10-18 10:13 EDT by dsteigne
Modified: 2011-05-23 21:14 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description dsteigne 2010-10-18 10:13:10 EDT
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:
Comment 1 Lukas Krejci 2010-11-18 13:52:24 EST
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@redhat.com>
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.
Comment 2 Lukas Krejci 2010-11-18 13:53:12 EST
Note that I didn't port this fix to the master branch because of the GUI overhaul that happens there anyway.
Comment 3 Corey Welton 2010-11-22 22:42:49 EST
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.
Comment 4 Corey Welton 2011-05-23 21:14:14 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 5 Corey Welton 2011-05-23 21:14:15 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 6 Corey Welton 2011-05-23 21:14:15 EDT
Bookkeeping - closing bug - fixed in recent release.

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