This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 850818 - Globally uncaught exception on clicking OK button while adding CLI Script alert notification to the alert definition
Globally uncaught exception on clicking OK button while adding CLI Script ale...
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Monitoring - Alerts (Show other bugs)
JON 3.1.1
Unspecified Unspecified
high Severity medium
: ---
: JON 3.1.2
Assigned To: Jirka Kremser
Mike Foley
:
Depends On:
Blocks: 852415
  Show dependency treegraph
 
Reported: 2012-08-22 09:25 EDT by Sunil Kondkar
Modified: 2013-09-11 06:59 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 852415 (view as bug list)
Environment:
Last Closed: 2013-09-11 06:59:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Exception (16.79 KB, text/plain)
2012-08-22 09:26 EDT, Sunil Kondkar
no flags Details
Screenshot (106.52 KB, image/png)
2012-08-22 09:27 EDT, Sunil Kondkar
no flags Details

  None (edit)
Description Sunil Kondkar 2012-08-22 09:25:51 EDT
Description of problem:

While creating an alert notification to the alert definition, user chooses CLI Script as a notification sender, clicking OK button with default selections displays Globally uncaught exception in UI.

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

Build: Version: 3.1.1.ER3
Build Number: 37108ca:67c6de8
Database: PostgreSQL 8.4.2
Browsers:
Firefox 10.0.2
IE 8.0.7600.16385

How reproducible:

Always

Steps to Reproduce:

1. Login to JBoss ON
2. Navigate to a 'Alerts->Definitions' tab of a resource (Ex: Platform)
3. Click on 'New' button
4. Enter name of the alert and click on the 'Notifications' tab.
5. Click on 'Add' button.
6. Select 'CLI Script' value from the dropdown 'Notification Sender'.
7. Click on 'OK' button (By default the radio button 'Myself' is selected)
8. The UI in background displays 'Globally uncaught exception'.
  
Actual results:

UI displays globally uncaught exception.

Expected results:

No error should be displayed

Additional info:

Additional Info: Exception is not displayed if user selects a repository and existing script or uploads a new scripts and clicks OK button.
Comment 1 Sunil Kondkar 2012-08-22 09:26:49 EDT
Created attachment 606271 [details]
Exception
Comment 2 Sunil Kondkar 2012-08-22 09:27:44 EDT
Created attachment 606272 [details]
Screenshot
Comment 3 Sunil Kondkar 2012-08-27 07:34:02 EDT
Additional Info:
Observed the same error when:

1. Creating alert alert definition with CLI script notification on a compatible group.
2. Creating alert definition template on a resource with CLI script notification.
(Administration->Alert Definition Template->Platform Resource)
Comment 4 Jirka Kremser 2012-08-28 08:37:28 EDT
http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=9fda60f

master
time:    Tue Aug 28 14:34:23 2012 +0200
commit:  9fda60f21e354f3b33a1ecf85b81cae19e0af1af
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 850818 - Globally uncaught exception on clicking OK button while adding CLI Script alert notification to the alert definition] Added the check whether the repository has been picked
Comment 6 Jirka Kremser 2012-11-02 11:16:28 EDT
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=537dfe925

branch:  release/jon3.1.x
time:    Tue Aug 28 14:34:23 2012 +0200
commit:  537dfe925d879d843f3ab36bf87215ecc2735e44
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 850818 - Globally uncaught exception on clicking OK button while adding CLI Script alert notification to the alert definition] Added the check whether the repository has been picked. (cherry picked from commit 9fda60f21e354f3b33a1ecf85b81cae19e0af1af)

changing status to MODIFIED
Comment 7 Simeon Pinder 2012-11-15 00:01:35 EST
Moving this to ON_QA as available for testing in https://brewweb.devel.redhat.com//buildinfo?buildID=243389.
Comment 8 Filip Brychta 2012-11-20 05:04:47 EST
Still occurs for following scenario:
1. Login to JBoss ON
2. Navigate to a 'Alerts->Definitions' tab of a resource (Ex: Platform)
3. Click on 'New' button
4. Enter name of the alert and click on the 'Notifications' tab.
5. Click on 'Add' button.
6. Select 'CLI Script' value from the dropdown 'Notification Sender'.
7. Select the repository where the script should reside from dropdown menu.
8. Upload new script radio button is checked by default. Left 'file' and 'version' fields empty and click on Ok button. 
9. The UI in background displays 'Globally uncaught exception'.

Note: the same behaviour when step 8 is changed this way:
Check existing script radio button and leave relevant dropdown menu empty. Click on Ok button.

So i guess that another check for empty 'existing script' and empty 'upload new script' fields must be added.
Comment 9 Jirka Kremser 2012-11-20 09:29:03 EST
http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=618b064ab

branch:  release/jon3.1.x
time:    Tue Nov 20 15:17:34 2012 +0100
commit:  618b064ab399d0b92dd827158234de4629cba403
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 850818 - Globally uncaught exception on clicking OK button while adding CLI Script alert notification to the alert definition] Another possible scenario where NPE was thrown was fixed by this commit. (cherry picked from commit 2ae8bc1158dcae4457a738a7414e3c71fd898ed0)
Comment 10 Mike Thompson 2012-11-21 12:01:21 EST
I had to revert this change as it was not compiling due to a missing dependency on the SortedSelectItem class.
Comment 11 Charles Crouch 2012-11-21 16:30:44 EST
Here is mike's revert commit http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?h=release/jon3.1.x&id=11d20d3eb0706fce99dab0d61e3730b329f2b0a1

Jirka, I'm wondering how if this fix got applied to master first, did it not blow up there too?
Comment 12 Jirka Kremser 2012-11-23 05:32:26 EST
Because in the master, there is commit (1c7723b1f) adding this SortedSelectItem class into our codebase, and it is not in the release branch. The commit was solving bug 675150, and this bug has no target release. Could I set its target to master and create a clone of it for JON 3.1.2 and cherry-pick over the 1c7723b1f. Then I can apply again the 618b064ab3 and it should work. 
Sorry for the inconvenience, I should have run the tests on the release branch, before cherry-picking the changes.
Comment 13 Charles Crouch 2012-11-28 13:13:38 EST
IMHO https://bugzilla.redhat.com/show_bug.cgi?id=675150 is too big a change for jon312. Can you just use the non-sorted select item in the version in the release branch?
Comment 14 Jirka Kremser 2012-11-30 16:11:06 EST
http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=51ec62419fca40fb15a2b845b2ee0938d1fd30e9

branch:  release/jon3.1.x
time:    Fri Nov 30 22:06:52 2012 +0100
commit:  51ec62419fca40fb15a2b845b2ee0938d1fd30e9
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 850818 - Globally uncaught exception on clicking OK button while adding CLI Script alert notification to the alert definition] Same changes as in commit 618b064ab399d0b92dd827158234de4629cba403 except of usage of SortedSelectItem


ok, it's done ^. Moving the status to MODIFIED.
Comment 15 Simeon Pinder 2012-12-07 01:31:30 EST
Moving to ON_QA as available for testing in ER3 or greater: https://brewweb.devel.redhat.com/buildinfo?buildID=246689
Comment 16 Sunil Kondkar 2012-12-07 06:41:58 EST
Verified on JON 3.1.2 ER3 build.

Verified that there is no exception on:

- By default 'Myself' selected and Not selecting a repository.
- Selecting 'Another User' and 'Username'/ 'Password' fields blank.
- Selecting repository and empty 'existing script' and empty 'upload new script' fields.

Verified above on a single resource, compatible group and alert definition template.

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