Bug 759485 - Error viewing live data in the resource metric graph portlet
Error viewing live data in the resource metric graph portlet
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.2
All All
unspecified Severity medium (vote)
: ---
: RHQ 4.3.0
Assigned To: Jay Shaughnessy
Mike Foley
:
Depends On:
Blocks: jon30-sprint9 790076
  Show dependency treegraph
 
Reported: 2011-12-02 09:00 EST by Lukas Krejci
Modified: 2013-08-31 06:16 EDT (History)
2 users (show)

See Also:
Fixed In Version: 4,3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 790076 (view as bug list)
Environment:
Last Closed: 2013-08-31 06:16:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Lukas Krejci 2011-12-02 09:00:49 EST
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:
Comment 1 Jay Shaughnessy 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.
Comment 2 Jay Shaughnessy 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.
Comment 3 Mike Foley 2011-12-12 11:53:35 EST
verified RHQ 3 master branch
Comment 4 Heiko W. Rupp 2013-08-31 06:16:12 EDT
Bulk close of old bugs in VERIFIED state.

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