截止日期任务抛出错误实体管理器已关闭。在jBPM 6.2.0中

时间:2015-08-12 10:37:24

标签: jbpm deadlines

我在jBPM 6.2.0

中运行截止日期任务时关闭了EntityManager

这是日志跟踪。我在代码中没有看到任何关闭实体管理工厂的内容。

            java.lang.IllegalStateException: EntityManager is closednull
at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1181)null
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.doJoinTransaction(ExtendedEntityManagerCreator.java:360)null
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:327)null
at com.sun.proxy.$Proxy142.joinTransaction(Unknown Source)null
at org.drools.persistence.jpa.JpaPersistenceContext.joinTransaction(JpaPersistenceContext.java:87)null
at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:519)null
at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)null
at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:73)null
at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)null
at org.drools.persistence.jta.TransactionLockInterceptor.execute(TransactionLockInterceptor.java:67)null
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:358)null
at org.jbpm.process.core.timer.impl.GlobalTimerService$DisposableCommandService.execute(GlobalTimerService.java:302)null
at org.jbpm.persistence.timer.GlobalJpaTimerJobInstance.call(GlobalJpaTimerJobInstance.java:77)null
at org.jbpm.persistence.timer.GlobalJpaTimerJobInstance.call(GlobalJpaTimerJobInstance.java:47)null
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)null
at java.util.concurrent.FutureTask.run(FutureTask.java:166)null
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)null
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)null
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)null
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)null
at java.lang.Thread.run(Thread.java:781)null

1 个答案:

答案 0 :(得分:1)

没有问题我得到了这个问题的答案。我们没有初始化持久性xml.Order下面的语句很重要,我们搞砸了。

<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/jbpmDS</jta-data-source>