Violation of unique constraint $$: duplicate value(s) for column(s) $$: SYS_PK_47 in statemen ---------------------------------------------------------------------------------------------
Key: CAMEL-2277 URL: https://issues.apache.org/activemq/browse/CAMEL-2277 Project: Apache Camel Issue Type: Bug Components: camel-bam Affects Versions: 2.1.0, 2.0.0, 1.6.2 Reporter: Charles Moulliard Assignee: James Strachan When the component camel-bam / BamRoutesTest is tested using the profile -P openjpa or the new one -P eclipselink, than errors like this one are generated {code} 2009-12-10 11:52:10,916 [ead 0: seda://a] DEBUG DefaultListableBeanFactory - Creating instance of bean 'org.apache.camel.bam.model.ProcessInstance' 2009-12-10 11:52:10,916 [ead 0: seda://a] DEBUG DefaultListableBeanFactory - Finished creating instance of bean 'org.apache.camel.bam.model.ProcessInstance' 2009-12-10 11:52:10,916 [ead 0: seda://a] DEBUG JpaBamProcessorSupport - About to flush on entity: ProcessInstance[123] with key: 123 2009-12-10 11:52:10,931 [ead 0: seda://a] DEBUG BamProcessorSupport - Correlation key: 123 with entity: ProcessInstance[123] 2009-12-10 11:52:10,931 [ead 0: seda://a] DEBUG JpaBamProcessor - Processing process instance: ProcessInstance[123] 2009-12-10 11:52:10,931 [ead 0: seda://a] DEBUG ActivityState - Activity first message: ActivityState[4 on ProcessInstance[123] Activity[5 name: a]] 2009-12-10 11:52:10,931 [ead 0: seda://a] DEBUG ActivityState - Activity complete: ActivityState[4 on ProcessInstance[123] Activity[5 name: a]] 2009-12-10 11:52:10,947 [ead 0: seda://a] ERROR BamProcessorSupport - Caught: org.springframework.orm.jpa.JpaSystemException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Violation of unique constraint $$: duplicate value(s) for column(s) $$: SYS_PK_47 in statement [INSERT INTO CAMEL_ACTIVITYSTATE (ID, RECEIVEDMESSAGECOUNT, TIMEOVERDUE, ESCALATIONLEVEL, TIMEEXPECTED, PROCESSINSTANCE_CORRELATIONKEY, ACTIVITYDEFINITION_ID) VALUES (?, ?, ?, ?, ?, ?, ?)] Error Code: -104 Call: INSERT INTO CAMEL_ACTIVITYSTATE (ID, RECEIVEDMESSAGECOUNT, TIMEOVERDUE, ESCALATIONLEVEL, TIMEEXPECTED, PROCESSINSTANCE_CORRELATIONKEY, ACTIVITYDEFINITION_ID) VALUES (?, ?, ?, ?, ?, ?, ?) bind => [4, 0, null, 0, null, 123, null] Query: InsertObjectQuery(ActivityState[4 on ProcessInstance[123] null]); nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Violation of unique constraint $$: duplicate value(s) for column(s) $$: SYS_PK_47 in statement [INSERT INTO CAMEL_ACTIVITYSTATE (ID, RECEIVEDMESSAGECOUNT, TIMEOVERDUE, ESCALATIONLEVEL, TIMEEXPECTED, PROCESSINSTANCE_CORRELATIONKEY, ACTIVITYDEFINITION_ID) VALUES (?, ?, ?, ?, ?, ?, ?)] Error Code: -104 {code} More information is required about datamodel and relations in order to solve this issue. Everything works fine with Hibernate profile -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.