Bug 728327 - SQLGrammarException thrown when trying to update Template Metric Collection Schedules
SQLGrammarException thrown when trying to update Template Metric Collection S...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
4.1
Unspecified Unspecified
low Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: rhq41 rhq41-ui
  Show dependency treegraph
 
Reported: 2011-08-04 13:56 EDT by Robert Buck
Modified: 2014-07-29 09:07 EDT (History)
3 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Robert Buck 2011-08-04 13:56:11 EDT
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 14:00:03 EDT
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 13:50:24 EDT
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 14:01:35 EDT
(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 09:07:54 EDT
Closing due to lack of follow-up.

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