+++ This bug was initially created as a clone of Bug #826224 +++ Description of problem: Group description which is longer then 100 characters results in a database exception: Message : Failed to create the resource group [All Platforms - Manual Group] : [1338334237397] java.lang.RuntimeException: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 -> 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 -> javax.persistence.PersistenceException:org.hibernate.exception.DataException: Could not execute JDBC batch update -> org.hibernate.exception.DataException:Could not execute JDBC batch update -> java.sql.BatchUpdateException:Batch entry 0 insert into RHQ_RESOURCE_GROUP (NAME, DESCRIPTION, CTIME, MTIME, MODIFIED_BY, GROUP_DEFINITION_ID, GROUP_BY, RECURSIVE, CATEGORY, RESOURCE_TYPE_ID, SUBJECT_ID, CLUSTER_KEY, CLUSTER_RESOURCE_GROUP_ID, AUTO_GROUP_PARENT_RESOURCE_ID, visible, ID) values ('All Platforms - Manual Group', 'A compatible group of platform resources which have been manually added to this group. In other words, this is not a DynaGroup.', '1338334237262', '1338334237262', 'rhqadmin', NULL, NULL, '0', 'MIXED', NULL, NULL, NULL, NULL, NULL, '1', '10051') was aborted. Call getNextException to see the cause.[SQLException=Batch entry 0 insert into RHQ_RESOURCE_GROUP (NAME, DESCRIPTION, CTIME, MTIME, MODIFIED_BY, GROUP_DEFINITION_ID, GROUP_BY, RECURSIVE, CATEGORY, RESOURCE_TYPE_ID, SUBJECT_ID, CLUSTER_KEY, CLUSTER_RESOURCE_GROUP_ID, AUTO_GROUP_PARENT_RESOURCE_ID, visible, ID) values ('All Platforms - Manual Group', 'A compatible group of platform resources which have been manually added to this group. In other words, this is not a DynaGroup.', '1338334237262', '1338334237262', 'rhqadmin', NULL, NULL, '0', 'MIXED', NULL, NULL, NULL, NULL, NULL, '1', '10051') was aborted. Call getNextException to see the cause. -> ERROR: value too long for type character varying(100)(error-code=0,sql-state=22001)] Version-Release number of selected component (if applicable): JON 3.0.1 How reproducible: Always Steps to Reproduce: 1. Create a compatible group with a description that contains 101 characters or more: Desc: "A very long description with a total length of one-hundred one (101) chracters." Actual results: Group creation fails with the following stack trace: [1338334237397] java.lang.RuntimeException: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 -> 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 -> javax.persistence.PersistenceException:org.hibernate.exception.DataException: Could not execute JDBC batch update -> org.hibernate.exception.DataException:Could not execute JDBC batch update -> java.sql.BatchUpdateException:Batch entry 0 insert into RHQ_RESOURCE_GROUP (NAME, DESCRIPTION, CTIME, MTIME, MODIFIED_BY, GROUP_DEFINITION_ID, GROUP_BY, RECURSIVE, CATEGORY, RESOURCE_TYPE_ID, SUBJECT_ID, CLUSTER_KEY, CLUSTER_RESOURCE_GROUP_ID, AUTO_GROUP_PARENT_RESOURCE_ID, visible, ID) values ('All Platforms - Manual Group', 'A compatible group of platform resources which have been manually added to this group. In other words, this is not a DynaGroup.', '1338334237262', '1338334237262', 'rhqadmin', NULL, NULL, '0', 'MIXED', NULL, NULL, NULL, NULL, NULL, '1', '10051') was aborted. Call getNextException to see the cause.[SQLException=Batch entry 0 insert into RHQ_RESOURCE_GROUP (NAME, DESCRIPTION, CTIME, MTIME, MODIFIED_BY, GROUP_DEFINITION_ID, GROUP_BY, RECURSIVE, CATEGORY, RESOURCE_TYPE_ID, SUBJECT_ID, CLUSTER_KEY, CLUSTER_RESOURCE_GROUP_ID, AUTO_GROUP_PARENT_RESOURCE_ID, visible, ID) values ('All Platforms - Manual Group', 'A compatible group of platform resources which have been manually added to this group. In other words, this is not a DynaGroup.', '1338334237262', '1338334237262', 'rhqadmin', NULL, NULL, '0', 'MIXED', NULL, NULL, NULL, NULL, NULL, '1', '10051') was aborted. Call getNextException to see the cause. -> ERROR: value too long for type character varying(100)(error-code=0,sql-state=22001)] 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) Expected results: Group creation should succeed Additional info: This issue appears to be the database schema limits the group name to 100 characters. For a description, this is VERY SHORT. One normally expects to a description to be 1024 bytes or larger. At bare minimum, if we are going to limit this to 100 characters then we should perform data validation on the input to ensure it meets the database requirement. --- Additional comment from loleary on 2012-05-29 16:01:18 EDT --- This issue occurs in JON 3.0, JON 3.0.1, and JON 3.1.0.Beta1. In JON 2.4.x the UI prevented the input of a group description that exceeded this limit. --- Additional comment from ccrouch on 2012-06-11 10:51:55 EDT --- As per 6/4/12 triage, target at jon311 --- Additional comment from ccrouch on 2012-08-02 18:27:39 EDT --- Lets just add the limit back on this field This issues needs another BZ and fix for the master branch
Master commit Id: 0aeaf8e Added the fix to limit the UI to 100 character names for the group names to match the database constraint. The UI will now not let you enter more than 100 chars and if you try to paste in a string greater than 100 chars then it will truncate the string to 100 chars.
verified buildid: ff37cd9
Bulk close of old bugs in VERIFIED state.