"ERROR: duplicate key value violates unique constraint "rhq_package_version_idx"" Error in JON server log
Issue
-
The following SQL error frequently occurs on the JON server log for various jboss scripts. What can be done to fix this issue?
2012-01-24 14:55:16,075 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 23505 2012-01-24 14:55:16,076 ERROR [org.hibernate.util.JDBCExceptionReporter] Batch entry 0 insert into RHQ_PACKAGE_VERSION (PACKAGE_ID, DISPLAY_NAME, SHORT_DESCRIPTION, LONG_DESCRIPTION, VERSION, DISPLAY_VERSION, ARCHITECTURE_ID, FILE_NAME, FILE_SIZE, FILE_MD5, FILE_SHA256, FILE_CREATION_TIME, LICENSE_NAME, LICENSE_VERSION, METADATA, CONFIG_ID, PACKAGE_BITS_ID, ID) values ('10757', 'password_tool.sh', NULL, NULL, 'none', NULL, '1', '/opt/jboss/jboss-eap-5.0.1_201009/jboss-as/bin/password_tool.sh', '2807', NULL, '8f28c8255e779f4b16aaa40ae6d6884f33da4a8a7f0a83d2ff373b2320f06487', '1276711888000', NULL, NULL, NULL, NULL, NULL, '158006') was aborted. Call getNextException to see the cause. 2012-01-24 14:55:16,076 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 23505 2012-01-24 14:55:16,076 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: duplicate key value violates unique constraint "rhq_package_version_idx" 2012-01-24 14:55:16,076 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
Environment
- JBoss Operations Network (JON) 2.4.0, 2.4.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.