AnsweredAssumed Answered

Constraint error thrown when history detail is enabled

Question asked by ruedesilva on Sep 26, 2011
Hi,

I get the following exception thrown sometimes when I have the history detail enabled. The constrained is on the unique primary key. I disabled the constraint just to see what new primary key it is getting. It was trying to reuse a primary key on the ACT_HI_DETAIL that was from some other process already completed. Is this a defect or something I need to configure?

Sep 26, 2011 11:10:25 AM org.activiti.engine.impl.interceptor.CommandContext clo
se
SEVERE: Error while closing command context
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: java.sql.SQLIntegrityConstraintViolationExc
eption: ORA-00001: unique constraint (WASABI.SYS_C0017506) violated

### The error may involve org.activiti.engine.impl.persistence.entity.HistoricDe
tailEntity.insertHistoricVariableUpdate-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique
constraint (WASABI.SYS_C0017506) violated

        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(Exception
Factory.java:8)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSq
lSession.java:120)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSq
lSession.java:107)
        at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.ja
va:420)
        at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:347)

        at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(Com
mandContext.java:147)
        at org.activiti.engine.impl.interceptor.CommandContext.close(CommandCont
ext.java:103)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execut
e(CommandContextInterceptor.java:49)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterc
eptor.java:33)
        at org.activiti.engine.impl.RuntimeServiceImpl.setVariable(RuntimeServic
eImpl.java:110)
        at com.revchain.process.ManageBPM.ManageBPMRules.claimTask(ManageBPMRule
s.java:672)
        at com.revchain.process.ManageBPM.ManageBPMBean.claimTask(ManageBPMBean.
java:140)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJo
inpointUsingReflection(AopUtils.java:281)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho
dInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho
dInvocation.proceed(ReflectiveMethodInvocation.java:154)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntrodu
ctionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntrodu
ctionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho
dInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisit
orImpl.visit(MethodInvocationVisitorImpl.java:15)
        at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.c
allback(EnvironmentInterceptorCallbackImpl.java:54)
        at com.bea.core.repackaged.springframework.jee.spi.EnvironmentIntercepto
r.invoke(EnvironmentInterceptor.java:30)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho
dInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocat
ionInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho
dInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntrodu
ctionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntrodu
ctionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho
dInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopPr
oxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy112.claimTask(Unknown Source)
        at com.revchain.process.ManageBPM.ManageBPMBean_b6vkn4_ManageBPMImpl.cla
imTask(ManageBPMBean_b6vkn4_ManageBPMImpl.java:1410)
        at com.revchain.process.ManageBPM.ManageBPMBean_b6vkn4_ManageBPMImpl_WLS
kel.invoke(Unknown Source)
        at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
        at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef
.java:230)
        at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(Unknown Source)
        at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:473)
        at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.jav
a:118)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique
constraint (WASABI.SYS_C0017506) violated

        at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.ja
va:85)
        at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:1
12)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:173)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.
java:194)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedSta
tement.java:947)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1222)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrep
aredStatement.java:3381)
        at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
ement.java:3482)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePrepa
redStatementWrapper.java:1373)
        at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.jav
a:98)
        at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(Prepare
dStatementLogger.java:45)
        at $Proxy130.execute(Unknown Source)
        at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(
PreparedStatementHandler.java:22)
        at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(R
outingStatementHandler.java:51)
        at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.jav
a:29)
        at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:75)
        at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.jav
a:43)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSq
lSession.java:118)
        … 42 more
<Sep 26, 2011 11:10:25 AM EDT> <Info> <EJB> <BEA-010227> <EJB Exception occurred
during invocation from home or business: weblogic.ejb.container.internal.Statel
essEJBHomeImpl@7e8d2a2 threw exception: org.apache.ibatis.exceptions.Persistence
Exception:
### Error updating database.  Cause: java.sql.SQLIntegrityConstraintViolationExc
eption: ORA-00001: unique constraint (WASABI.SYS_C0017506) violated

### The error may involve org.activiti.engine.impl.persistence.entity.HistoricDe
tailEntity.insertHistoricVariableUpdate-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique
constraint (WASABI.SYS_C0017506) violated

Outcomes