Bug 805210 - Group: Operations portlet fails to load data if Oracle is used on the back-end due to 0 length rhq_config_property.string_value for OPERATION_STATUS being treated as NULL
Summary: Group: Operations portlet fails to load data if Oracle is used on the back-en...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.0.0
Hardware: All
OS: All
high
urgent
Target Milestone: ---
: JON 3.1.0
Assignee: Jay Shaughnessy
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 805212
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-20 16:45 UTC by bkramer
Modified: 2018-11-27 20:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-11 10:58:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description bkramer 2012-03-20 16:45:42 UTC
Description of problem:

When navigating to the Group View summary page there is continuous "Loading data..." message on the Group Operations portlet.

When trying to get the portlet settings the following exceptions are thrown:

Message : Globally uncaught exception 
Severity : Error  

Time : Friday, March 16, 2012 1:53:55 PM Etc/GMT-1 
Detail : com.google.gwt.core.client.JavaScriptException:(TypeError): Für
die Eigenschaft "length" kann kein Wert abgerufen werden: Das Objekt ist
Null oder undefiniert
description: Für die Eigenschaft "length" kann kein Wert abgerufen
werden: Das Objekt ist Null oder undefiniert
number: -2146823281--- STACK TRACE FOLLOWS ---(TypeError): Für die
Eigenschaft "length" kann kein Wert abgerufen werden: Das Objekt ist
Null oder undefiniert
description: Für die Eigenschaft "length" kann kein Wert abgerufen
werden: Das Objekt ist Null oder undefiniert
number: -2146823281


Message : Failure in datasource while processing FETCH request. 
Severity : Error  

Time : Friday, March 16, 2012 1:55:40 PM Etc/GMT-1 
Detail : com.google.gwt.core.client.JavaScriptException:(TypeError): Für
die Eigenschaft "length" kann kein Wert abgerufen werden: Das Objekt ist
Null oder undefiniert
description: Für die Eigenschaft "length" kann kein Wert abgerufen
werden: Das Objekt ist Null oder undefiniert
number: -2146823281--- STACK TRACE FOLLOWS ---(TypeError): Für die
Eigenschaft "length" kann kein Wert abgerufen werden: Das Objekt ist
Null oder undefiniert
description: Für die Eigenschaft "length" kann kein Wert abgerufen
werden: Das Objekt ist Null oder undefiniert
number: -2146823281

The following SQL:

select c.* 
from   rhq_dashboard_portlet p inner join rhq_config_property c 
       on p.configuration_id = c.configuration_id inner join rhq_dashboard d 
       on p.dashboard_id = d.id inner join rhq_subject s on d.subject_id = s.id 
where  s.name = 'rhqadmin' and p.name = 'Group: Operations'


returns null for the OPERATION_STATUS property value.


Version-Release number of selected component (if applicable):
JON 3.0.GA

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 bkramer 2012-03-20 16:49:52 UTC
RHQ bugzilla for the same issue: 

https://bugzilla.redhat.com/show_bug.cgi?id=805212

Comment 2 Mike Foley 2012-03-26 15:55:31 UTC
per BZ triage ... make this a high.

JON had no locale requirements.

So these are not release blocking for JON.

Comment 3 Larry O'Leary 2012-03-26 16:17:18 UTC
Please note that the locale requirement mentioned in Comment 2 is assuming that this issue is actually due to locale support.

Comment 4 Jay Shaughnessy 2012-03-27 18:57:11 UTC
master commit 8ffe2a02a8a8fb6b12e78ea02b3c4ee588c82fd7

I couldn't reproduce the issue directly but I did find a few problems in
the portlet which I fixed here.  I think it's likely that the problem
will be solved by these fixes.  Primarily, it adds support in this portlet
and others to better handle having all of the enum filter values (in this
case the operation status enums) unset. Also, changes in config were not
being applied to the current instantiation of the portlet.

A workaround for existing, problematic portlets is to delete it and then add 
it back using "Edit Mode" and "Add Portlet".

Test Notes:
Make sure you try the global/group/resource level operation history portlets.
Alter various config and make sure it affects the current portlet and
is also stored properly (leave global dash or the detail view, and then
and come back and see if it is correct).

*** May need to be verified against a JON 3.1 build ***

Comment 5 Larry O'Leary 2012-04-11 02:46:57 UTC
This issue is a direct result of Oracle and its VARCHAR2 type treating null and empty string as one in the same and returning null in both cases. This was originally reported in Bug 536526.

The fix for this needs to be to handle the null values returned properly (i.e. we can not use empty string as a valid/meaningful value as it will be no different then null).

Comment 6 Larry O'Leary 2012-04-11 03:11:49 UTC
Updating the title to better reflect this issue:
   Group: Operations portlet fails to load data if Oracle is used on the back-end due to 0 length rhq_config_property.string_value for OPERATION_STATUS being treated as NULL

Comment 7 Larry O'Leary 2012-04-11 03:34:14 UTC
Just realized (and actually suspected) that this issue seems to affect other portlets on the group's Summary dashboard. Not sure if this affects portlets on the resource's Summary dashboard or on the system dashboard.

Comment 8 Charles Crouch 2012-04-16 14:12:04 UTC
Removing RHQ trackers. This will be fixed upstream by bug #805212

Comment 9 Jay Shaughnessy 2012-04-16 19:39:53 UTC
Fixed upstream.

Comment 10 Sunil Kondkar 2012-06-13 11:11:32 UTC
Verified on Version: 3.1.0.GA Build Number: b575169:a53e41e

Verified global/group/resource level operation history portlets and also other portlets. Changed portlet configurations and verified that it reflects the portlet and stored properly.
Verified on postgres and oracle.


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