7 Replies Latest reply on Nov 24, 2009 11:29 AM by Hugo Raimundo

    jbpm 4.2 - Subprocess issue

    Makarand Kulkarni Newbie

      Hi,

      In following process definition, running process through jbpm-console

      Start-Task1-Task2- Subprocess(This has simple task with Java Task which just prints messages)- end

      After running Task2, I am getting following error


      HTTP Status 500 -
      
      type Exception report
      
      message
      
      description The server encountered an internal error () that prevented it from fulfilling this request.
      
      exception
      
      org.jboss.resteasy.spi.UnhandledException: org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#30046]
       org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
       org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
       org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
       org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
       org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
       org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
       org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#30046]
       org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
       org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
       org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2569)
       org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2725)
       org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)
       org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
       org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
       org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)
       org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
       org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
       org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
       org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:1048)
       org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:188)
       org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
       org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
       org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:562)
       org.hibernate.impl.SessionImpl.save(SessionImpl.java:550)
       org.hibernate.impl.SessionImpl.save(SessionImpl.java:546)
       org.jbpm.pvm.internal.hibernate.DbSessionImpl.save(DbSessionImpl.java:87)
       org.jbpm.jpdl.internal.activity.SubProcessActivity.execute(SubProcessActivity.java:91)
       org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
       org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:655)
       org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:615)
       org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:416)
       org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:402)
       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       java.lang.reflect.Method.invoke(Method.java:597)
       org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
       org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_5.signal(ExecutionImpl_$$_javassist_5.java)
       org.jbpm.pvm.internal.task.TaskImpl.complete(TaskImpl.java:194)
       org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:60)
       org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:32)
       org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
       org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.executeInNewTx(JtaTransactionInterceptor.java:87)
       org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:66)
       org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
       org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.executeWithRetry(JtaRetryInterceptor.java:52)
       org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:45)
       org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
       org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
       org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
       org.jbpm.pvm.internal.svc.TaskServiceImpl.completeTask(TaskServiceImpl.java:96)
       org.jbpm.integration.console.TaskManagementImpl.completeTask(TaskManagementImpl.java:102)
       org.jboss.bpm.console.server.FormProcessingFacade.closeTaskWithUI(FormProcessingFacade.java:161)
       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       java.lang.reflect.Method.invoke(Method.java:597)
       org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
       org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
       org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
       org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
       org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
       org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
       org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
       org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
       org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      java.sql.SQLException: Integrity constraint violation FK_EXEC_SUBPI table: JBPM4_EXECUTION in statement [delete from JBPM4_EXECUTION where DBID_=? and DBVERSION_=?]
       org.hsqldb.jdbc.Util.throwError(Unknown Source)
       org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
       org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:94)
       org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)
       org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2551)
       org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2725)
       org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)
       org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
       org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
       org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)
       org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
       org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
       org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
       org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:1048)
       org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:188)
       org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
       org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
       org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:562)
       org.hibernate.impl.SessionImpl.save(SessionImpl.java:550)
       org.hibernate.impl.SessionImpl.save(SessionImpl.java:546)
       org.jbpm.pvm.internal.hibernate.DbSessionImpl.save(DbSessionImpl.java:87)
       org.jbpm.jpdl.internal.activity.SubProcessActivity.execute(SubProcessActivity.java:91)
       org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
       org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:655)
       org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:615)
       org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:416)
       org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:402)
       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       java.lang.reflect.Method.invoke(Method.java:597)
       org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
       org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_5.signal(ExecutionImpl_$$_javassist_5.java)
       org.jbpm.pvm.internal.task.TaskImpl.complete(TaskImpl.java:194)
       org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:60)
       org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:32)
       org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
       org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.executeInNewTx(JtaTransactionInterceptor.java:87)
       org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:66)
       org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
       org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.executeWithRetry(JtaRetryInterceptor.java:52)
       org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:45)
       org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
       org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
       org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
       org.jbpm.pvm.internal.svc.TaskServiceImpl.completeTask(TaskServiceImpl.java:96)
       org.jbpm.integration.console.TaskManagementImpl.completeTask(TaskManagementImpl.java:102)
       org.jboss.bpm.console.server.FormProcessingFacade.closeTaskWithUI(FormProcessingFacade.java:161)
       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       java.lang.reflect.Method.invoke(Method.java:597)
       org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
       org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
       org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
       org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
       org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
       org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
       org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
       org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
       org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      note The full stack trace of the root cause is available in the JBoss Web/2.1.1.GA logs.
      JBoss Web/2.1.1.GA