Products | Versions |
---|---|
TIBCO BusinessEvents Enterprise Edition | - |
Not Applicable | - |
Resolution:
Description:
==========
TIBCO BusinessEvents engine throwing Primary key violation exceptions
Environment:
==========
Operating system: All
TIBCO BusinessEvents (BE) version: 4.0.1
Symptoms:
=========
The BE engine log has the following error statements:
2011 Aug 17 20:24:11:524 GMT +0 App-Name Error [inference-class$DBWriter.Thread.2] - [root] Failed writing to DB. Will re-try :java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'pk_D_OD'. Cannot insert duplicate key in object 'dbo.D_OD'.
2011 Aug 17 20:24:11:524 GMT +0 App-Name Error [inference-class$DBWriter.Thread.2] - [root] java.lang.RuntimeException: java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'pk_D_OD'. Cannot insert duplicate key in object 'dbo.D_OD'.
2011 Aug 17 21:48:26:036 GMT +0 App-Name Warning [inference-class$DBWriter.Thread.2] - [jdbcstore] SaveTransaction failed. Error=Violation of PRIMARY KEY constraint 'pk_D_LT'. Cannot insert duplicate key in object 'dbo.D_LT'. code=2627
2011 Aug 17 21:48:26:036 GMT +0 App-Name Error [inference-class$DBWriter.Thread.2] - [root] Failed writing to DB. Will re-try :java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'pk_D_LT'. Cannot insert duplicate key in object 'dbo.D_LT'.
2011 Aug 17 21:48:23:661 GMT +0 App-Name Warning [inference-class$DBWriter.Thread.1] - [jdbcstore] SaveTransaction failed. Error=Violation of PRIMARY KEY constraint 'pk_D_OR'. Cannot insert duplicate key in object 'dbo.D_OR'. code=2627
2011 Aug 17 21:48:23:661 GMT +0 App-Name Error [inference-class$DBWriter.Thread.1] - [root] Failed writing to DB. Will re-try :java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'pk_D_OR'. Cannot insert duplicate key in object 'dbo.D_OR'.
2011 Aug 17 20:24:11:488 GMT +0 App-Name Warning [inference-class$DBWriter.Thread.2] - [jdbcstore] SaveTransaction failed. Error=Cannot insert duplicate key row in object 'dbo.ObjectTable' with unique index 'i_ObjectTable1'. code=2601
Resolution:
=========
Add the following two properties to the inference class Processing Unit in the CDD (Cluster Deployment Descriptor) file. Setting this property to false means that all post-RTC operations are done on a single thread (avoids database deadlocks):
Agent.<agentname>.enableParallelOps=false
To reduce the number of database threads to 1 use the following property:
Agent.<agentName>.dbthreadcount=1
AgentName is the Agentclass name for the inference engine under the Agent classes tab in the cdd file.