Bug 1010319 - Globally uncaught exception while trying to compare datasource's configuration
Globally uncaught exception while trying to compare datasource's configuration
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Core Server (Show other bugs)
JON 3.1.2
Unspecified Unspecified
high Severity high
: ER02
: JON 3.2.0
Assigned To: Heiko W. Rupp
Mike Foley
:
Depends On:
Blocks: 1010321
  Show dependency treegraph
 
Reported: 2013-09-20 09:53 EDT by bkramer
Modified: 2014-01-02 15:38 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
configCompare.png (189.76 KB, image/png)
2013-10-02 10:28 EDT, Armine Hovsepyan
no flags Details
configCompare2.png (158.21 KB, image/png)
2013-10-02 10:29 EDT, Armine Hovsepyan
no flags Details

  None (edit)
Description bkramer 2013-09-20 09:53:43 EDT
Description of problem:
It is not possible to compare datasource's configurations. I tried some other resources and compare configuration worked fine.

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

How reproducible:
Always

Steps to Reproduce:
1. Navigate to DefaultDS resource (on the left side) -> Configuration -> Current
2. Make a change in the DefaultDS;
3. In the Configuration -> History -> select two configurations and press "Compare" button; 

Actual results:
The screen will be dimmed and "Globally Uncaught Exception" will be displayed in the background. The only way to go get rid of this dimmed screen is to refresh the page. At the same time there are no exceptions logged in the rhq-server-log4j.log file and no messages logged in the Message Center. 

Expected results:
To have pop-up window that would display differences between two configurations.

Additional info:
This was tested with EAP 5.1.2.
Comment 1 Jay Shaughnessy 2013-09-20 17:11:38 EDT
I had no problem with a datasource config compare using 4.9 and an AS7 DS.  I couldn't find another bz that related to this though, so we should try to repro with an EAP5, which would have different config.
Comment 2 Heiko W. Rupp 2013-09-23 05:47:05 EDT
I see this as well on master. JavaScript console shows

Mon Sep 23 11:44:30 GMT+200 2013 
WARNING: Es ist eine nicht abgefangene Ausnahme aufgetreten.
java.lang.ClassCastException: null
	at Unknown.anonymous(fillInStackTrace_1@http://localhost@1496)
	at Unknown.anonymous(fillInStackTrace@http://localhost@1265)
	at Unknown.anonymous($fillInStackTrace@http://localhost@156)
	at Unknown.anonymous($$init_0@http://localhost@152)
	at Unknown.anonymous(Throwable_0@http://localhost@188)
	at Unknown.anonymous(Exception_0@http://localhost@237)
	at Unknown.anonymous(RuntimeException_0@http://localhost@256)
	at Unknown.anonymous(ClassCastException_0@http://localhost@18995)
	at Unknown.anonymous(dynamicCast@http://localhost@4931)
	at Unknown.anonymous($buildNode@http://localhost@73930)
	at Unknown.anonymous($buildTree@http://localhost@74009)
	at Unknown.anonymous(onDraw_22@http://localhost@74079)
	at Unknown.anonymous(rendered@http://localhost@14514)
	at Unknown.anonymous(onDraw@http://localhost@14449)
	at Unknown.anonymous(isc_Canvas_draw@http://localhost@2077)
	at Unknown.anonymous(isc_Layout_layoutChildren@http://localhost@441)
	at Unknown.anonymous(isc_Layout_drawChildren@http://localhost@343)
	at Unknown.anonymous(isc_Canvas_draw@http://localhost@2068)
	at Unknown.anonymous(isc_Layout_layoutChildren@http://localhost@444)
	at Unknown.anonymous(isc_c_Class_invokeSuper@http://localhost@284)
	at Unknown.anonymous(isc_Window_layoutChildren@http://localhost@127)
	at Unknown.anonymous(isc_Layout_drawChildren@http://localhost@343)
	at Unknown.anonymous(isc_Canvas_draw@http://localhost@2068)
	at Unknown.anonymous(isc_c_Class_invokeSuper@http://localhost@284)
	at Unknown.anonymous(isc_Window_draw@http://localhost@77)
	at Unknown.anonymous(isc_Canvas_show@http://localhost@2985)
	at Unknown.anonymous(isc_c_Class_invokeSuper@http://localhost@284)
	at Unknown.anonymous(isc_Window_show@http://localhost@138)
	at Unknown.anonymous($show@http://localhost@14843)
	at Unknown.anonymous(show@http://localhost@14989)
	at Unknown.anonymous(displayComparisonDialog_0@http://localhost@74054)
	at Unknown.anonymous(onTypesLoaded_6@http://localhost@74136)
	at Unknown.anonymous(onTypesLoaded_48@http://localhost@148638)
	at Unknown.anonymous($getResourceTypes_0@http://localhost@54074)
	at Unknown.anonymous($getResourceTypes@http://localhost@148546)
	at Unknown.anonymous(displayComparisonDialog@http://localhost@74032)
	at Unknown.anonymous(execute_69@http://localhost@142394)
	at Unknown.anonymous(@http://localhost@2778)
	at Unknown.anonymous(apply@http://localhost@870)
	at Unknown.anonymous(entry0@http://localhost@915)
	at Unknown.anonymous(@http://localhost@900)
	at Unknown.anonymous(@-1)
	at Unknown.anonymous(isc_c_Class_fireCallback@http://localhost@301)
	at Unknown.anonymous(isc_Class_fireCallback@http://localhost@399)
	at Unknown.anonymous(isc_DataSource_fireResponseCallbacks@http://localhost@562)
	at Unknown.anonymous(isc_DataSource__completeResponseProcessing@http://localhost@559)
	at Unknown.anonymous(isc_DataSource_processResponse@http://localhost@408)
	at Unknown.anonymous($processResponse@http://localhost@2809)
	at Unknown.anonymous($processResponse_0@http://localhost@41148)
	at Unknown.anonymous(onTypesLoaded_40@http://localhost@142804)
	at Unknown.anonymous($getResourceTypes_0@http://localhost@54074)
	at Unknown.anonymous($getResourceTypes_1@http://localhost@54130)
	at Unknown.anonymous($onSuccess_419@http://localhost@142749)
	at Unknown.anonymous(onSuccess_421@http://localhost@142773)
	at Unknown.anonymous(onResponseReceived@http://localhost@8992)
	at Unknown.anonymous(onResponseReceived_6@http://localhost@57879)
	at Unknown.anonymous($fireOnResponseReceived@http://localhost@2619)
	at Unknown.anonymous(onReadyStateChange_0@http://localhost@2938)
	at Unknown.anonymous(@http://localhost@10190)
	at Unknown.anonymous(apply@http://localhost@870)
	at Unknown.anonymous(entry0@http://localhost@915)
	at Unknown.anonymous(@http://localhost@900)
	at Unknown.anonymous(Unknown@-1)
Comment 3 Heiko W. Rupp 2013-09-23 06:01:25 EDT
And now with detailed stack traces:

WARNING: Es ist eine nicht abgefangene Ausnahme aufgetreten.
java.lang.ClassCastException: null
	at Unknown.anonymous(com_google_gwt_core_client_impl_StackTraceCreator$CollectorChrome_fillInStackTrace__Ljava_lang_Throwable_2V@http://localhost@1503)
	at Unknown.anonymous(com_google_gwt_core_client_impl_StackTraceCreator_fillInStackTrace__Ljava_lang_Throwable_2V@http://localhost@1274)
	at Unknown.anonymous(java_lang_Throwable_$fillInStackTrace__Ljava_lang_Throwable_2Ljava_lang_Throwable_2@http://localhost@161)
	at Unknown.anonymous(java_lang_Throwable_$$init__Ljava_lang_Throwable_2V@http://localhost@157)
	at Unknown.anonymous(java_lang_Throwable_Throwable__V@http://localhost@193)
	at Unknown.anonymous(java_lang_Exception_Exception__V@http://localhost@240)
	at Unknown.anonymous(java_lang_RuntimeException_RuntimeException__V@http://localhost@259)
	at Unknown.anonymous(java_lang_ClassCastException_ClassCastException__V@http://localhost@19062)
	at Unknown.anonymous(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2ILjava_lang_Object_2@http://localhost@4950)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_components_configuration_ConfigurationComparisonView_$buildNode__Lorg_rhq_enterprise_gui_coregui_client_components_configuration_ConfigurationComparisonView_2Lcom_smartgwt_client_widgets_tree_TreeNode_2Ljava_util_Collection_2Ljava_util_List_2V@http://localhost@73931)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_components_configuration_ConfigurationComparisonView_$buildTree__Lorg_rhq_enterprise_gui_coregui_client_components_configuration_ConfigurationComparisonView_2Lcom_smartgwt_client_widgets_tree_Tree_2@http://localhost@74010)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_components_configuration_ConfigurationComparisonView_onDraw__V@http://localhost@74080)
	at Unknown.anonymous(com_smartgwt_client_widgets_BaseWidget_rendered__V@http://localhost@14565)
	at Unknown.anonymous(onDraw@http://localhost@14500)
	at Unknown.anonymous(isc_Canvas_draw@http://localhost@2077)
	at Unknown.anonymous(isc_Layout_layoutChildren@http://localhost@441)
	at Unknown.anonymous(isc_Layout_drawChildren@http://localhost@343)
	at Unknown.anonymous(isc_Canvas_draw@http://localhost@2068)
	at Unknown.anonymous(isc_Layout_layoutChildren@http://localhost@444)
	at Unknown.anonymous(isc_c_Class_invokeSuper@http://localhost@284)
	at Unknown.anonymous(isc_Window_layoutChildren@http://localhost@127)
	at Unknown.anonymous(isc_Layout_drawChildren@http://localhost@343)
	at Unknown.anonymous(isc_Canvas_draw@http://localhost@2068)
	at Unknown.anonymous(isc_c_Class_invokeSuper@http://localhost@284)
	at Unknown.anonymous(isc_Window_draw@http://localhost@77)
	at Unknown.anonymous(isc_Canvas_show@http://localhost@2985)
	at Unknown.anonymous(isc_c_Class_invokeSuper@http://localhost@284)
	at Unknown.anonymous(isc_Window_show@http://localhost@138)
	at Unknown.anonymous(com_smartgwt_client_widgets_Canvas_$show__Lcom_smartgwt_client_widgets_Canvas_2V@http://localhost@14892)
	at Unknown.anonymous(com_smartgwt_client_widgets_Canvas_show__V@http://localhost@15040)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_components_configuration_ConfigurationComparisonView_displayComparisonDialog__Lorg_rhq_core_domain_configuration_definition_ConfigurationDefinition_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2V@http://localhost@74055)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_components_configuration_ConfigurationComparisonView$3_onTypesLoaded__Lorg_rhq_core_domain_resource_ResourceType_2V@http://localhost@74137)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository$3_onTypesLoaded__Ljava_util_Map_2V@http://localhost@148639)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository_$getResourceTypes__Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository_2_3Ljava_lang_Integer_2Ljava_util_EnumSet_2Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository$TypesLoadedCallback_2V@http://localhost@54287)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository_$getResourceTypes__Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository_2Ljava_lang_Integer_2Ljava_util_EnumSet_2Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository$TypeLoadedCallback_2V@http://localhost@148547)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_components_configuration_ConfigurationComparisonView_displayComparisonDialog__Ljava_util_ArrayList_2V@http://localhost@74033)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_configuration_AbstractConfigurationHistoryListView$2$1_execute__Lcom_smartgwt_client_data_DSResponse_2Ljava_lang_Object_2Lcom_smartgwt_client_data_DSRequest_2V@http://localhost@142395)
	at Unknown.anonymous(@http://localhost@2779)
	at Unknown.anonymous(com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2@http://localhost@877)
	at Unknown.anonymous(com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2@http://localhost@922)
	at Unknown.anonymous(@http://localhost@907)
	at Unknown.anonymous(@-1)
	at Unknown.anonymous(isc_c_Class_fireCallback@http://localhost@301)
	at Unknown.anonymous(isc_Class_fireCallback@http://localhost@399)
	at Unknown.anonymous(isc_DataSource_fireResponseCallbacks@http://localhost@562)
	at Unknown.anonymous(isc_DataSource__completeResponseProcessing@http://localhost@559)
	at Unknown.anonymous(isc_DataSource_processResponse@http://localhost@408)
	at Unknown.anonymous(com_smartgwt_client_data_DataSource_$processResponse__Lcom_smartgwt_client_data_DataSource_2Ljava_lang_String_2Lcom_smartgwt_client_data_DSResponse_2V@http://localhost@2810)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_util_RPCDataSource_$processResponse__Lorg_rhq_enterprise_gui_coregui_client_util_RPCDataSource_2Ljava_lang_String_2Lcom_smartgwt_client_data_DSResponse_2V@http://localhost@41149)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_configuration_ResourceConfigurationHistoryDataSource$1$1_onTypesLoaded__Ljava_util_Map_2V@http://localhost@142805)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository_$getResourceTypes__Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository_2_3Ljava_lang_Integer_2Ljava_util_EnumSet_2Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository$TypesLoadedCallback_2V@http://localhost@54287)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository_$getResourceTypes__Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository_2_3Ljava_lang_Integer_2Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_type_ResourceTypeRepository$TypesLoadedCallback_2V@http://localhost@54343)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_configuration_ResourceConfigurationHistoryDataSource$1_$onSuccess__Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_detail_configuration_ResourceConfigurationHistoryDataSource$1_2Lorg_rhq_core_domain_util_PageList_2V@http://localhost@142750)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_configuration_ResourceConfigurationHistoryDataSource$1_onSuccess__Ljava_lang_Object_2V@http://localhost@142774)
	at Unknown.anonymous(com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V@http://localhost@9027)
	at Unknown.anonymous(org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V@http://localhost@58122)
	at Unknown.anonymous(com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V@http://localhost@2630)
	at Unknown.anonymous(com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V@http://localhost@2951)
	at Unknown.anonymous(@http://localhost@10229)
	at Unknown.anonymous(com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2@http://localhost@877)
	at Unknown.anonymous(com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2@http://localhost@922)
	at Unknown.anonymous(@http://localhost@907)
	at Unknown.anonymous(Unknown@-1)
Comment 4 Heiko W. Rupp 2013-09-23 10:15:28 EDT
/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java:176

The 'map' actually seems to be a Configuration object -- see screen shot from debugger
org.rhq.core.domain.configuration.AbstractPropertyMap has two implementations
* PropertyMap
* Configuration
but the code does unconditionally cast to PropertyMap. The following is a band aid

                    if (map instanceof PropertyMap) {
                        properties.add((PropertyMap) map);
                    } else {
                        // map is a Configuration
                        String name = definition.getName();
                        PropertyMap innerMap = map.getMap(name);
                        properties.add(innerMap);
                        // TODO recursively add the map's items
                    }

But as the comment indicates does not decent into the individual maps (in the case  of the as5 plugin those are the individual Connection properties)
Comment 5 Heiko W. Rupp 2013-09-23 10:55:49 EDT
master 9f4e250 now checks for the type of "map" as described in the previous comment.

We do not descent into those maps of maps (that could be arbitrarily deep). So the user would still need to check those Connection Properties manually.
Comment 6 Armine Hovsepyan 2013-10-02 10:28:22 EDT
Created attachment 806519 [details]
configCompare.png
Comment 7 Armine Hovsepyan 2013-10-02 10:29:17 EDT
Created attachment 806520 [details]
configCompare2.png
Comment 8 Armine Hovsepyan 2013-10-02 10:29:44 EDT
verified.

please get screen-shots attached.

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