My Oracle Support Banner

java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (Doc ID 1955591.1)

Last updated on AUGUST 02, 2018

Applies to:

Oracle SOA Suite - Version 11.1.1.6.0 to 11.1.1.9.0 [Release 11gR1 to 11g]
Information in this document applies to any platform.

Symptoms

Not able to open audit flow for some instances, where seeing errors related to AUDIT DETAILS table in the dehydration store.

 

ERROR
-----------------------

<BEA-010026> <Exception occurred during commit of transaction Name=[EJB
com.collaxa.cube.engine.ejb.impl.bpel.BPELAuditTrailBean.storeAuditBatch(com.collaxa.cube.engine.audit.SerializedBatchEvent)],
Xid=BEA1-1C2A2ED33018C22095F1(620726699),Status=Rolled back.
[Reason=Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.1.v20111018-r10243):
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException:
ORA-1: unique constraint (GOT1BPELSIT_SOAINFRA.AD_PK) violated

Error Code: 1
Call: INSERT INTO AUDIT_DETAILS (CIKEY, DETAIL_ID, BIN, BIN_CSIZE, BIN_USIZE, DOC_REF, CI_PARTITION_DATE) VALUES (?, ?, ?, ?, ?, ?, ?)
        bind => [7 parameters bound]
Query:
InsertObjectQuery(com.collaxa.cube.persistence.dto.AuditDetails@29676b97)],num
RepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds
left=60,XAServerResourceInfo[SOADataSource_got1_bpel_sit]=(ServerResourceInfo[
SOADataSource_got1_bpel_sit]=(state=rolledback,assigned=got1_bpel_sit_ms02),xar=SOADataSource,
re-Registered = false),SCInfo[got1_bpel_sit+got1_bpel_sit_ms02]=(state=rolledback),properties=
({weblogic.transaction.name=[EJB
com.collaxa.cube.engine.ejb.impl.bpel.BPELAuditTrailBean.storeAuditBatch(com.collaxa.cube.engine.audit.SerializedBatchEvent)]}),
local properties=({weblogic.jdbc.jta.SOADataSource=[ No XAConnection is attached to this TxInfo ]}),
OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=got1_bpel_sit_ms02+<host>:<port>+got1_bpel_sit+t3+,
...:
weblogic.transaction.RollbackException: Unexpected exception in
beforeCompletion:
sync=org.eclipse.persistence.transaction.JTASynchronizationListener@270c2267

Internal Exception: java.sql.SQLIntegrityConstraintViolationException:
ORA-1: unique constraint (GOT1BPELSIT_SOAINFRA.AD_PK) violated

Error Code: 1
Call: INSERT INTO AUDIT_DETAILS (CIKEY, DETAIL_ID, BIN, BIN_CSIZE, BIN_USIZE,
DOC_REF, CI_PARTITION_DATE) VALUES (?, ?, ?, ?, ?, ?, ?)
        bind => [7 parameters bound]
Query:
InsertObjectQuery(com.collaxa.cube.persistence.dto.AuditDetails@29676b97)
         at
weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1884)
        at
weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:376)
        at
weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:268)
        at
weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:623)
        at
weblogic.ejb.container.internal.BaseLocalObject.__WL_postInvokeTxRetry(BaseLocalObject.java:455)
        at
weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:52)
        at
com.collaxa.cube.engine.ejb.impl.bpel.BPELAuditTrailBean_imuwv4_IAuditTrailLocalBeanImpl.storeAuditBatch(Unknown Source)
        at
com.collaxa.cube.engine.dispatch.message.audit.AuditMessageHandler.handle(AuditMessageHandler.java:45)
        at
com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:140)
        at
com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatchTask.java:88)
        at
com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:65)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:909)
        at
com.collaxa.cube.engine.dispatch.Dispatcher$ContextCapturingThreadFactory$2.run(Dispatcher.java:850)
        at java.lang.Thread.run(Thread.java:662)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException:
ORA-1: unique constraint (GOT1BPELSIT_SOAINFRA.AD_PK) violated

 

 

 

Changes

They have applied patch 13904546 which theoretically resolves an  unique constraint violated against the primary key of the AUDIT_TRAIL table; but their error is against the AUDIT_DETAILS table.
This error occurs when they have the audit set to ASYC.  If they set the audit to SYNC they do not experience the aberrant behavior.  

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.