Bug 691544 - Entering very large numbers in Dynagroups Recalculate Interval field causes stack trace
Summary: Entering very large numbers in Dynagroups Recalculate Interval field causes s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.0.0.B02
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: RHQ 4.3.0
Assignee: Mike Thompson
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: gwt-dynagroups rhq-uxd
TreeView+ depends on / blocked
 
Reported: 2011-03-28 19:38 UTC by Corey Welton
Modified: 2013-09-01 10:18 UTC (History)
3 users (show)

Fixed In Version: 4.3.0
Clone Of:
Environment:
Last Closed: 2013-09-01 10:18:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Corey Welton 2011-03-28 19:38:25 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.  Navigate to an existing DG or create a new one
2.  Enter the string "999999999999999999999999999" into the Recalculation Interval field.
3.  View results
  
Actual results:
Failure in datasource while processing UPDATE request.

java.lang.NumberFormatException:For input string: "1e+27"
--- STACK TRACE FOLLOWS ---
For input string: "1e+27"
    at Unknown.java_lang_NumberFormatException_$NumberFormatException__Ljava_lang_NumberFormatException_2Ljava_lang_String_2Ljava_lang_NumberFormatException_2(Unknown source:0)
    at Unknown.java_lang_Long_parseLong__Ljava_lang_String_2IJ(Unknown source:0)
    at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_GroupDefinitionDataSource_$copyValues__Lorg_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_GroupDefinitionDataSource_2Lcom_smartgwt_client_data_Record_2Lorg_rhq_core_domain_resource_group_GroupDefinition_2(Unknown source:0)
    at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_GroupDefinitionDataSource_executeUpdate__Lcom_smartgwt_client_data_Record_2Lcom_smartgwt_client_data_Record_2Lcom_smartgwt_client_data_DSRequest_2Lcom_smartgwt_client_data_DSResponse_2V(Unknown source:0)
    at Unknown.org_rhq_enterprise_gui_coregui_client_util_RPCDataSource_transformRequest__Lcom_smartgwt_client_data_DSRequest_2Ljava_lang_Object_2(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.isc_DataSource_getServiceInputs(Unknown source:0)
    at Unknown.isc_DataSource_sendDSRequest(Unknown source:0)
    at Unknown.isc_DataSource_performDSOperation(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
    at Unknown.com_smartgwt_client_widgets_form_DynamicForm_$saveData__Lcom_smartgwt_client_widgets_form_DynamicForm_2Lcom_smartgwt_client_data_DSCallback_2V(Unknown source:0)
    at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_SingleGroupDefinitionView_$saveForm__Lorg_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_SingleGroupDefinitionView_2Lorg_rhq_enterprise_gui_coregui_client_util_selenium_LocatableDynamicForm_2Lorg_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_SingleGroupDefinitionView$DynaGroupChildrenView_2ZV(Unknown source:0)
    at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_SingleGroupDefinitionView$1_onClick__Lcom_smartgwt_client_widgets_events_ClickEvent_2V(Unknown source:0)
    at Unknown.com_smartgwt_client_widgets_events_ClickEvent_dispatch__Lcom_google_gwt_event_shared_EventHandler_2V(Unknown source:0)
    at Unknown.com_google_gwt_event_shared_HandlerManager$HandlerRegistry_$fireEvent__Lcom_google_gwt_event_shared_HandlerManager$HandlerRegistry_2Lcom_google_gwt_event_shared_GwtEvent_2ZV(Unknown source:0)
    at Unknown.com_google_gwt_event_shared_HandlerManager_$fireEvent__Lcom_google_gwt_event_shared_HandlerManager_2Lcom_google_gwt_event_shared_GwtEvent_2V(Unknown source:0)
    at Unknown.com_smartgwt_client_widgets_BaseWidget_fireEvent__Lcom_google_gwt_event_shared_GwtEvent_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.isc_StatefulCanvas_handleActivate(Unknown source:0)
    at Unknown.isc_StatefulCanvas_handleClick(Unknown source:0)
    at Unknown.isc_c_EventHandler_bubbleEvent(Unknown source:0)
    at Unknown.isc_c_EventHandler_handleClick(Unknown source:0)
    at Unknown.isc_c_EventHandler__handleMouseUp(Unknown source:0)
    at Unknown.isc_c_EventHandler_handleMouseUp(Unknown source:0)
    at Unknown.isc_c_EventHandler_dispatch(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)


Expected results:

Some upper bounding on numbers entered into this field.

Additional info:

Comment 1 John Mazzitelli 2012-01-27 14:28:55 UTC
while we aer in here, lets see if we can fix the units. We have it where you have to enter milliseconds, which is pretty annoying. Perhaps we can allow differrent units or change the default units to something more realistic, like minutes. Under the covers we can convert to milliseconds when we pass the value to the server.

Comment 2 Mike Thompson 2012-01-30 05:08:52 UTC
I did change the units to minutes (from ms) and kept the representation in the database as milliseconds as I didn't want to break any existing functionality based on those tables. The view shows in minutes and the database is still in millis.

I originally started out using various units (via DurationItem), however, things got a little complicated with min/max ranges in the various units so I dropped back to minutes as an acceptable UOM. As indicated, this fulfills the requirement and is simpler/cleaner unless multiple UOM are required.

Current maximum set to 1 week (60 * 24 * 7 minutes).

I also changed the current resource bundle (Messages.properties) to read (min) instead of (ms) however, i didn't change the other language bundles to reflect the language changes.

These changes are in the features/gwt-upgrade branch.

Comment 4 Mike Thompson 2012-01-30 17:16:32 UTC
These changes are not in master yet (in feature/gwt-upgrade) so I will leave the status as ON_DEV.

Comment 5 Mike Thompson 2012-01-31 21:31:14 UTC
Git commit id: 5754205

Comment 6 Mike Thompson 2012-02-21 17:42:47 UTC
Now in master.

Also commented out other foreign resource bundles for re-translation.

commit: 223f5fd

Comment 7 Heiko W. Rupp 2013-09-01 10:18:51 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.


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