Bug 755544

Summary: Throws 'Globally uncaught exception' on 'Resource Metric Graph' on dashboard, if we forget to select 'Metric'
Product: [Other] RHQ Project Reporter: Jeeva Kandasamy <jkandasa>
Component: Core UIAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: unspecifiedCC: hrupp, rbuck, skondkar, snegrea
Target Milestone: ---   
Target Release: JON 3.0.0, RHQ 4.3.0   
Hardware: All   
OS: All   
Whiteboard:
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: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 752488    
Attachments:
Description Flags
Resource Metric Graph 1
none
Resource Metric Graph 2
none
Resource Metric Graph 3
none
GUI log none

Description Jeeva Kandasamy 2011-11-21 12:46:03 UTC
Created attachment 534771 [details]
Resource Metric Graph 1

Description of problem:
Throws 'Globally uncaught exception' on 'Resource Metric Graph' on dashboard, if we forget to select 'Metric'. Complete dashboard gets blocked!

Version-Release number of selected component (if applicable):
JBoss Operations Network 
Version: 3.0.0.CR2
Build Number: 0a92497:a16c2ea
GWT Version: 2.0.4
SmartGWT Version: 2.4


How reproducible:
100%

Steps to Reproduce:
1.Logon to JON
2.Navigate to Dashboard
3.Select 'Edit Mode'
4.Add 'Resource Group Metric Graph' (or) 'Resource Metric Graph' portlet
5.on portlet settings select some 'Resource' and leave blank 'Metric' type
6.Click 'Save'
7.Throws 'Globally uncaught exception'
8.Navigate to some other menu other then dashboard
9.Come back to Dashboard. Dashboard get blocked completely!
  
Actual results:
Allowed to save 'Metric graph' without selection of 'Metric' type

Expected results:
Should not allow to save.

Additional info:
Screen shots and log files are attached. There is no error trace on server side.

Comment 1 Jeeva Kandasamy 2011-11-21 12:46:38 UTC
Created attachment 534772 [details]
Resource Metric Graph 2

Comment 2 Jeeva Kandasamy 2011-11-21 12:47:11 UTC
Created attachment 534773 [details]
Resource Metric Graph 3

Comment 3 Jeeva Kandasamy 2011-11-21 12:48:08 UTC
Created attachment 534774 [details]
GUI log

Comment 4 Heiko W. Rupp 2011-11-23 10:22:06 UTC
This is a clear release blocker caused by NullPointerExceptions in ResourceGraphPortlet
Currently the only fix for the user is to open the database and remove the portlet from the rhq_dashboard_portlet table.


Best would be not to allow to save when the resource or metric are not set.
Fallback is to

Comment 5 Heiko W. Rupp 2011-11-23 12:50:36 UTC
f6cee08 in master prevents the NPE and thus the global exception.

Comment 6 Robert Buck 2011-11-23 20:15:57 UTC
master verified; please push to the branch.

Comment 7 Heiko W. Rupp 2011-11-23 20:26:14 UTC
ed291a9 in release branch

Comment 8 Sunil Kondkar 2011-11-28 13:27:02 UTC
Verified on build#24 (https://hudson.qa.jboss.com/hudson/view/JON3%20Core/job/rhq-release-gwt-locales/24/)

Verified by selecting a 'Resource' and leaving 'Metric' type blank for both 
'Resource Group Metric Graph' and 'Resource Metric Graph' portlets. saving it does not display any exception.

Comment 9 Mike Foley 2012-02-07 19:25:09 UTC
marking VERIFIED JON 3 bugs to CLOSED/CURRENTRELEASE

Comment 10 Mike Foley 2012-02-07 19:28:23 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE