Bug 728327 - SQLGrammarException thrown when trying to update Template Metric Collection Schedules
Summary: SQLGrammarException thrown when trying to update Template Metric Collection S...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server
Version: 4.1
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: rhq41 rhq41-ui
TreeView+ depends on / blocked
 
Reported: 2011-08-04 17:56 UTC by Robert Buck
Modified: 2014-07-29 13:07 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-07-29 13:07:54 UTC
Embargoed:


Attachments (Terms of Use)

Description Robert Buck 2011-08-04 17:56:11 UTC
I tried to update the schedule for a metric to 30 seconds and it failed after about one minute with the following exception:


Message :	
Failed to set collection interval to [30] seconds for metric [] [[Used Swap Space]] by default for ResourceType with id [10008].
Severity :	
Error
	
Time :	
Thursday, August 4, 2011 1:53:04 PM Etc/GMT+4
Detail :	
java.lang.RuntimeException:[1312480384219] org.rhq.enterprise.server.measurement.MeasurementException:Error updating measurement definitions: org.hibernate.exception.SQLGrammarException: could not execute update query
--- STACK TRACE FOLLOWS ---
[1312480384219] org.rhq.enterprise.server.measurement.MeasurementException:Error updating measurement definitions: org.hibernate.exception.SQLGrammarException: could not execute update query
    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.anonymous(Unknown source:0)

Comment 1 Robert Buck 2011-08-04 18:00:03 UTC
Found there were 38756 of these at the same time:

2011-08-04 13:57:58,686 ERROR [org.rhq.enterprise.server.alert.engine.internal.AlertConditionCacheCoordinator] There were 1 alert conditions that did not fire. Please check the configuration of the JMS subsystem and try again.
2011-08-04 13:57:58,687 ERROR [org.rhq.enterprise.server.alert.engine.internal.AlertConditionCacheCoordinator] Error processing matched cache element 'MeasurementNumericCacheElement[ alertConditionTriggerId=11815, alertConditionOperator=GREATER_THAN, alertConditionValue=0.0 ]': javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state

This can't be good.

Comment 2 John Mazzitelli 2011-08-16 17:50:24 UTC
If you see errors in the GWT client side that show an ID number for the exception, such as what you have here:

java.lang.RuntimeException:[1312480384219]

go to the server log file, find the exception with the same ID number and attach that stack as well. That will be more useful because these exceptions are actually happening server side, and are just forwarded over the wire to the GWT client. The core root problem will be logged on the server though - which is why it is more helpful to see the server log.

Comment 3 John Mazzitelli 2011-08-16 18:01:35 UTC
(In reply to comment #1)
> Found there were 38756 of these at the same time:
> 
> 2011-08-04 13:57:58,686 ERROR
> [org.rhq.enterprise.server.alert.engine.internal.AlertConditionCacheCoordinator]
> There were 1 alert conditions that did not fire. Please check the configuration
> of the JMS subsystem and try again.
> 2011-08-04 13:57:58,687 ERROR
> [org.rhq.enterprise.server.alert.engine.internal.AlertConditionCacheCoordinator]
> Error processing matched cache element 'MeasurementNumericCacheElement[
> alertConditionTriggerId=11815, alertConditionOperator=GREATER_THAN,
> alertConditionValue=0.0 ]': javax.transaction.RollbackException:
> [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted]
> [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't
> commit because the transaction is in aborted state
> 
> This can't be good.

This probably occurred due to tx timeouts.

Comment 4 Jay Shaughnessy 2014-07-29 13:07:54 UTC
Closing due to lack of follow-up.


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