Description of problem: Uncaught exception creating child resource on AS7 plugin. Negative test entering text into a listbox expecting a number. Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. On As7 Domain Controller resource, create a child/domain deployment 2. Upload any .war file 3. In the timeout textbox, enter a letter instead of a number, as expected 4. Observe globally uncaught exception Actual results: Globally uncaught exception Expected results: Exceptions are caught and handled. Additional info: 1. ssage : 2. Globally uncaught exception 3. Severity : 4. Error 5. 6. Time : 7. Tuesday, June 28, 2011 9:52:47 AM Etc/GMT+4 8. Detail : 9. java.lang.NumberFormatException:For input string: "a" 10. --- STACK TRACE FOLLOWS --- 11. For input string: "a" 12. at Unknown.java_lang_NumberFormatException_$NumberFormatException__Ljava_lang_NumberFormatException_2Ljava_lang_String_2Ljava_lang_NumberFormatException_2(Unknown source:0) 13. at Unknown.java_lang_Number__1_1parseAndValidateInt__Ljava_lang_String_2IIII(Unknown source:0) 14. at Unknown.org_rhq_enterprise_gui_coregui_client_util_TypeConversionUtility_toLong__Ljava_lang_Object_2Ljava_lang_Long_2(Unknown source:0) 15. at Unknown.org_rhq_enterprise_gui_coregui_client_components_form_DurationItem_$calculateValue__Lorg_rhq_enterprise_gui_coregui_client_components_form_DurationItem_2Ljava_lang_Long_2(Unknown source:0) 16. at Unknown.org_rhq_enterprise_gui_coregui_client_components_form_DurationItem_$updateValue__Lorg_rhq_enterprise_gui_coregui_client_components_form_DurationItem_2V(Unknown source:0) 17. at Unknown.org_rhq_enterprise_gui_coregui_client_components_form_DurationItem$1_onChanged__Lcom_smartgwt_client_widgets_form_fields_events_ChangedEvent_2V(Unknown source:0) 18. at Unknown.com_smartgwt_client_widgets_form_fields_events_ChangedEvent_dispatch__Lcom_google_gwt_event_shared_EventHandler_2V(Unknown source:0) 19. 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) 20. 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) 21. at Unknown.com_smartgwt_client_core_DataClass_fireEvent__Lcom_google_gwt_event_shared_GwtEvent_2V(Unknown source:0) 22. at Unknown.anonymous(Unknown source:0) 23. 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) 24. at Unknown.anonymous(Unknown source:0) 25. at Unknown.isc_FormItem_handleChanged(Unknown source:0) 26. at Unknown.isc_FormItem__updateValue(Unknown source:0) 27. at Unknown.isc_FormItem_updateValue(Unknown source:0) 28. at Unknown.isc_FormItem__handleInput(Unknown source:0) 29. at Unknown.oninput(Unknown source:0) 30. at Unknown.anonymous(Unknown source:0)
This is not as7 specific at all.
Note this also happens when you e.g. enter 'a' into the "timeout" field of an operation.
Ian can you please take over? I see that in DurationItem an IntegerRange validator is set up, but this seem not to be used and thus calculateValue() is calling Long integerValue = TypeConversionUtility.toLong(value); which bails out with a NumberFormatException on input of non-Integers/Longs I have tried adding an end value to the Integer range, but this did not change anything for me.
[master ab1b95a] fixes this.
well ... the number format exception is fixed. i get this caught exception now ... Message : Failed to create a new resource Severity : Error Time : Friday, October 21, 2011 11:40:03 AM Etc/GMT+4 Detail : java.lang.RuntimeException:[1319211603771] javax.ejb.EJBException:java.lang.RuntimeException: Error while sending create resource request to agent service -> java.lang.RuntimeException:Error while sending create resource request to agent service -> org.rhq.core.clientapi.agent.PluginContainerException:Resource component could not be retrieved for resource [Resource[id=10691, type=JBossAS7-Standalone, key=/root/EAP6/jboss-as-7.0.0.Final, name=foleymonsterbox1.foleyhomenetwork, parent=foleymonsterbox1.foleyhomenetwork]] because the component is not started. Its state is [STOPPED] --- STACK TRACE FOLLOWS --- [1319211603771] javax.ejb.EJBException:java.lang.RuntimeException: Error while sending create resource request to agent service -> java.lang.RuntimeException:Error while sending create resource request to agent service -> org.rhq.core.clientapi.agent.PluginContainerException:Resource component could not be retrieved for resource [Resource[id=10691, type=JBossAS7-Standalone, key=/root/EAP6/jboss-as-7.0.0.Final, name=foleymonsterbox1.foleyhomenetwork, parent=foleymonsterbox1.foleyhomenetwork]] because the component is not started. Its state is [STOPPED] at Unknown.java_lang_RuntimeException_$RuntimeException__Ljava_lang_RuntimeException_2Ljava_lang_RuntimeException_2(Unknown source:0) at Unknown.com_google_gwt_user_client_rpc_core_java_lang_RuntimeException_1FieldSerializer_instantiate__Lcom_google_gwt_user_client_rpc_SerializationStreamReader_2Ljava_lang_RuntimeException_2(Unknown source:0) at Unknown.com_google_gwt_user_client_rpc_impl_SerializerBase$MethodMap_$instantiate__Lcom_google_gwt_user_client_rpc_impl_SerializerBase$MethodMap_2Lcom_google_gwt_user_client_rpc_SerializationStreamReader_2Ljava_lang_String_2Ljava_lang_Object_2(Unknown source:0) at Unknown.com_google_gwt_user_client_rpc_impl_SerializerBase_$instantiate__Lcom_google_gwt_user_client_rpc_impl_SerializerBase_2Lcom_google_gwt_user_client_rpc_SerializationStreamReader_2Ljava_lang_String_2Ljava_lang_Object_2(Unknown source:0) at Unknown.com_google_gwt_user_client_rpc_impl_AbstractSerializationStreamReader_$readObject__Lcom_google_gwt_user_client_rpc_impl_AbstractSerializationStreamReader_2Ljava_lang_Object_2(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.handleEvent(Unknown source:0) at Unknown.SJOWContentBoundary(Unknown source:0) at Unknown.anonymous(Unknown source:0
This is expected if your AS7 Server is not running, because the AS7 Server resource in RHQ needs to be up/green in order to successfully create new child resources under it.
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE