<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
ConstraintViolationException in JBPM4_HIST_ACTINST table
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/abdulrahman">Abdul Rahman Kunhi Ahamed</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/562050#562050">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I am running into a ConstraintViolationException when executing a job in the jbpm.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The constraint being violated is the primary key for the table JBPM4_HIST_ACTINST.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>There is no particular scenario when this issue happens, however the state transition involed is always a timed transition with a due time(escalation). And we are trying to trigger it manually.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The only possible solution is that to disable the primary key in the history table. However we are not sure of its impact on jbpm's working.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Please find below the exception trace. Please advise.</p><p class="MsoNormal">org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update</p><p class="MsoNormal">                at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)</p><p class="MsoNormal">                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)</p><p class="MsoNormal">                at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)</p><p class="MsoNormal">                at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)</p><p class="MsoNormal">                at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)</p><p class="MsoNormal">                at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)</p><p class="MsoNormal">                at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2252)</p><p class="MsoNormal">                at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)</p><p class="MsoNormal">                at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)</p><p class="MsoNormal">                at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)</p><p class="MsoNormal">                at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)</p><p class="MsoNormal">                at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)</p><p class="MsoNormal">                at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)</p><p class="MsoNormal">                at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)</p><p class="MsoNormal">                at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)</p><p class="MsoNormal">                at org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:56)</p><p class="MsoNormal">                at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:106)</p><p class="MsoNormal">                at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:65)</p><p class="MsoNormal">                at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:61)</p><p class="MsoNormal">                at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)</p><p class="MsoNormal">                at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)</p><p class="MsoNormal">                at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)</p><p class="MsoNormal">                at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)</p><p class="MsoNormal">                at org.jbpm.pvm.internal.svc.ManagementServiceImpl.executeJob(ManagementServiceImpl.java:37)</p><p class="MsoNormal">                ......</p><p class="MsoNormal">                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</p><p class="MsoNormal">                at java.lang.reflect.Method.invoke(Method.java:597)</p><p class="MsoNormal">                at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)</p><p class="MsoNormal">                at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348)</p><p class="MsoNormal">                at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)</p><p class="MsoNormal">                at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)</p><p class="MsoNormal">                at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)</p><p class="MsoNormal">                at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)</p><p class="MsoNormal">                at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)</p><p class="MsoNormal">                at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:95)</p><p class="MsoNormal">                at javax.faces.component.UICommand.broadcast(UICommand.java:387)</p><p class="MsoNormal">                at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)</p><p class="MsoNormal">                at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)</p><p class="MsoNormal">                at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)</p><p class="MsoNormal">                at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)</p><p class="MsoNormal">                at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)</p><p class="MsoNormal">                at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)</p><p class="MsoNormal">                at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)</p><p class="MsoNormal">                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)</p><p class="MsoNormal">                at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)</p><p class="MsoNormal">                at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)</p><p class="MsoNormal">                at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)</p><p class="MsoNormal">                at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)</p><p class="MsoNormal">                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)</p><p class="MsoNormal">                at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)</p><p class="MsoNormal">                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)</p><p class="MsoNormal">                at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)</p><p class="MsoNormal">                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)</p><p class="MsoNormal">                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)</p><p class="MsoNormal">                at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)</p><p class="MsoNormal">                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)</p><p class="MsoNormal">                at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:86)</p><p class="MsoNormal">                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)</p><p class="MsoNormal">                at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)</p><p class="MsoNormal">                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)</p><p class="MsoNormal">                at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)</p><p class="MsoNormal">                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)</p><p class="MsoNormal">                at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)</p><p class="MsoNormal">                at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)</p><p class="MsoNormal">                at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)</p><p class="MsoNormal">                at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)</p><p class="MsoNormal">                at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)</p><p class="MsoNormal">                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)</p><p class="MsoNormal">                at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)</p><p class="MsoNormal">                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)</p><p class="MsoNormal">                at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)</p><p class="MsoNormal">                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)</p><p class="MsoNormal">                at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)</p><p class="MsoNormal">                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)</p><p class="MsoNormal">                at com.dhl.ost.filter.AccessFilter.doFilter(Unknown Source)</p><p class="MsoNormal">                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)</p><p class="MsoNormal">                at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)</p><p class="MsoNormal">                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)</p><p class="MsoNormal">                at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)</p><p class="MsoNormal">                at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)</p><p class="MsoNormal">                at weblogic.security.service.SecurityManager.runAs(Unknown Source)</p><p class="MsoNormal">                at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)</p><p class="MsoNormal">                at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)</p><p class="MsoNormal">                at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)</p><p class="MsoNormal">                at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)</p><p class="MsoNormal">                at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)</p><p class="MsoNormal">Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (OSTUSER1.BIN$j7sVs2OuC+bgQEilfksI4A==$0) violated</p><p class="MsoNormal" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p class="MsoNormal">                at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:566)</p><p class="MsoNormal">                at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9365)</p><p class="MsoNormal">                at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:210)</p><p class="MsoNormal">                at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:191)</p><p class="MsoNormal">                at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)</p><p class="MsoNormal">                at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)</p><p class="MsoNormal">                ... 105 more</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/562050#562050">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>