Bug 790076 - Error viewing live data in the resource metric graph portlet
Summary: Error viewing live data in the resource metric graph portlet
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.2
Hardware: All
OS: All
high
medium
Target Milestone: ---
: JON 3.0.1
Assignee: Jay Shaughnessy
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 759485
Blocks: jon30-sprint9
TreeView+ depends on / blocked
 
Reported: 2012-02-13 15:47 UTC by Charles Crouch
Modified: 2015-02-01 23:27 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 759485
Environment:
Last Closed: 2013-09-03 15:11:45 UTC
Embargoed:


Attachments (Terms of Use)

Description Charles Crouch 2012-02-13 15:47:49 UTC
+++ This bug was initially created as a clone of Bug #759485 +++

Description of problem:
When clicking on live data icon of the resource metric graph portlet, there's a uncaught global exception in the GUI (with no server-side counterpart).

java.util.NoSuchElementException:null
--- STACK TRACE FOLLOWS ---
null
   at Unknown.java_util_NoSuchElementException_$NoSuchElementException__Ljava_util_NoSuchElementException_2Ljava_util_NoSuchElementException_2(Unknown source:0)
   at Unknown.java_util_AbstractList$IteratorImpl_$next__Ljava_util_AbstractList$IteratorImpl_2Ljava_lang_Object_2(Unknown source:0)
   at Unknown.java_util_AbstractHashMap$EntrySetIterator_next__Ljava_lang_Object_2(Unknown source:0)
   at Unknown.java_util_AbstractMap$1$1_next__Ljava_lang_Object_2(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_LiveGraphView$4$1_$onSuccess__Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_LiveGraphView$4$1_2Ljava_util_Set_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_LiveGraphView$4$1_onSuccess__Ljava_lang_Object_2V(Unknown source:0)
   at Unknown.com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
   at Unknown.com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V(Unknown source:0)
   at Unknown.com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)


Version-Release number of selected component (if applicable):
4.2.0.JON300.CR5

How reproducible:
always

Steps to Reproduce:
1. Add the "resource metric graph" portlet to dashboard (either global or resource specific)
2. Click on the live data icon in the top-right corner.
  
Actual results:
uncaught exception in the message center

Expected results:
no exceptions

Additional info:

--- Additional comment from jshaughn on 2011-12-02 13:32:24 EST ---


The problem is maybe two-fold.  The exception results from not protecting
against an empty metric value return.  I will fix this.  The second
problem is that there really shouldn't be an empty value returned.

Interestingly, Lukas was just "lucky" in that the graphing actually
seems to work for all resource types other than the one he used: CPU.
At least all the ones I tried until I asked him what he used :)

So, with the fix for problem 1 the graph does not generate an exception
but it also does not display any data.  I'll look at seeing if 
CpuComponent can be tweaked to provide something for a live data
request.  The issue is due to the fact that we already do some
complex work to generate CPU metrics.

--- Additional comment from jshaughn on 2011-12-02 14:02:41 EST ---

master commit 69e2b1d81dc42b0bfc12ee8e32b08d7b2beba38d

- Fixed the live graph code to throw out metric requests returning no values
  so we should be safe from the type of exception reported.
- Fixed CpuComponent to return valid data on a live metric request, instead
  of null, so CPU resources should now give proper live graphs.

--- Additional comment from mfoley on 2011-12-12 11:53:35 EST ---

verified RHQ 3 master branch

Comment 1 Jay Shaughnessy 2012-02-13 18:59:57 UTC
Cherry-pick from master:

release/jon3.0.x commit: 34653b7a47a6f3aaea2485928d5f31e0c17f2a94

Comment 2 Simeon Pinder 2012-02-17 05:34:14 UTC
Moving to ON_QA for testing with JON 3.0.1.GA RC5 or better:
https://brewweb.devel.redhat.com//buildinfo?buildID=199114

Comment 3 Sunil Kondkar 2012-02-17 11:42:40 UTC
Verified on JON 3.0.1.GA RC5 (Build Number: dd8a001:fbca611)

Verified for global and resource specific "resource metric graph" portlet. Clicking on live data icon displays live graphs.

Comment 4 Heiko W. Rupp 2013-09-03 15:11:45 UTC
Bulk closing of old issues in VERIFIED state.


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