[jBPM Development] - Help me! processinstance why not delete?
by chen lei
chen lei [http://community.jboss.org/people/clsun88] created the discussion
"Help me! processinstance why not delete?"
To view the discussion, visit: http://community.jboss.org/message/558440#558440
--------------------------------------------------------------
*my project use JBPM 3.2.1. Now ,customer business Data is very so many. I use JBPM API (deleteProcessInstance) delete data.but console out Error.Error is deplay:*
org.jbpm.JbpmException: problem closing services {persistence=org.jbpm.persistence.JbpmPersistenceException: hibernate flush failed}
at org.jbpm.svc.Services.close(Services.java:234)
at org.jbpm.JbpmContext.close(JbpmContext.java:139)
at com.wedge.edp.framework.jbpm.dao.support.JbpmTemplate.closeJbpmContext(JbpmTemplate.java:109)
at com.wedge.edp.framework.jbpm.dao.support.JbpmTemplate.execute(JbpmTemplate.java:84)
at com.wedge.edp.framework.jbpm.service.support.OpenWorkflowContextAdvice.invoke(OpenWorkflowContextAdvice.java:22)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:630)
at com.wedge.edp.framework.jbpm.application.JbpmProcessApplication$$EnhancerByCGLIB$$22de81b1.deleteProcess(<generated>)
at com.wedge.rms.commons.process.service.impl.ProcessServiceImpl.proceeDelete(ProcessServiceImpl.java:345)
at com.wedge.rms.commons.process.service.impl.ProcessServiceImpl$$FastClassByCGLIB$$e6553eb9.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:695)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:630)
at com.wedge.rms.commons.process.service.impl.ProcessServiceImpl$$EnhancerByCGLIB$$95e4e6ee.proceeDelete(<generated>)
at test.wfTest.delete(wfTest.java:51)
at test.wfTest.main(wfTest.java:46)
Caused by: org.jbpm.persistence.JbpmPersistenceException: hibernate flush failed
at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:236)
at org.jbpm.svc.Services.close(Services.java:222)
... 28 more
Caused by: org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.graph.exe.ProcessInstance#6094]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2491)
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2647)
at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:74)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.jbpm.persistence.db.DbPersistenceService.flushSession(DbPersistenceService.java:267)
at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:231)
... 29 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: DELETE 语句与 REFERENCE 约束"FK_TOKEN_SUBPI"冲突。该冲突发生于数据库"PES",表"dbo.JBPM_TOKEN", column 'SUBPROCESSINSTANCE_'。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2473)
... 39 more
*see database.JBPM_PROCESSINSTANCE and JBPM_TOKEN.Table.subprocessinstance_ is null.*
*why I can't delete it? how should I delete?*
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/558440#558440]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[JBoss AS7 Development] - types of deployment errors and their handling
by Alexey Loubyansky
Alexey Loubyansky [http://community.jboss.org/people/alex.loubyansky%40jboss.com] created the discussion
"types of deployment errors and their handling"
To view the discussion, visit: http://community.jboss.org/message/558137#558137
--------------------------------------------------------------
I'd like to understand the idea behind the current design, atm it's confusing to me. I want to clarify whether there is a central point for service startup/lifecycle error handling or different kinds of errors at different phases are supposed to go through different error handling code.
There is ServiceListener which has event callbacks including serviceFailed for startup errors. There are implementations of ServiceListener (like ServerStartupListener) that collect all the failures and then later they can be queried for the errors to handle/log them, etc.
ServiceListeners are available only inside BatchBuilder, BatchServiceBuilder, ServiceBuilder, ServiceController, so listeners can be invoked from only instances of those classes.
Question 1. There could be errors related to a service creation/initialization/start that happen before a service (service builder, controller, etc) is even created (as a Java object). E.g. the logic that is performed in ServiceActivator.activate(ctx) and errors like the deployment root doesn't exist, etc. So, should these errors be reported to ServiceListener? Currently, they are not and this logic executed outside of service builders and controllers, so they can't be reported to service listeners.
Question 2. There is BatchBuilder.install() method which may throw ServiceRegistryException. This method installs services going through the dependencies, etc. If errors happen, those errors are immediately propagated up and are re-thrown from install() w/o notifying the registered listeners. I guess, the listeners are actually supposed to be notified in this case?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/558137#558137]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months