0 Replies Latest reply on Mar 25, 2014 3:51 AM by Jina Lu

    JPAWorkingMemoryDbLogger logger stoped working

    Jina Lu Newbie

      In my project I'm working with jbpm 5.3, drools and servicemix. Recently I started getting errors when servicemix jbpm bundle is trying to create JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);

      Any ideas what could cause the problem

       

      09:25:22,000 | ERROR | dfidifThread-80 | SingleSessionCommandService| Could not commit session

      java.lang.RuntimeException: Unable to commit transaction

          at org.drools.container.spring.beans.persistence.DroolsSpringTransactionManager.commit(DroolsSpringTransactionManager.java:70)[51:drools-spring:5.4.0.Final]

          at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:371)[205:org.drools.core:5.4.0.Final]

          at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.getEnvironment(CommandBasedStatefulKnowledgeSession.java:478)[205:org.drools.core:5.4.0.Final]

          at org.jbpm.process.audit.JPAWorkingMemoryDbLogger.<init>(JPAWorkingMemoryDbLogger.java:52)[203:lt.project.osgi.org.jbpm.jbpm-bam:5.3.0.Final]

          at my.project.mymod.jbpm.listeners.SessionListener.afterSessionCreated(SessionListene.java:56)[380:mymod-jbpm:1.0.0.SNAPSHOT]

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)[75:org.springframework.beans:3.0.6.RELEASE]

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)[75:org.springframework.beans:3.0.6.RELEASE]

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)[75:org.springframework.beans:3.0.6.RELEASE]

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[75:org.springframework.beans:3.0.6.RELEASE]

          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)[75:org.springframework.beans:3.0.6.RELEASE]

          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[75:org.springframework.beans:3.0.6.RELEASE]

          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[75:org.springframework.beans:3.0.6.RELEASE]

          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)[75:org.springframework.beans:3.0.6.RELEASE]

          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)[75:org.springframework.beans:3.0.6.RELEASE]

          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[74:org.springframework.context:3.0.6.RELEASE]

          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[82:org.springframework.osgi.core:1.2.1]

          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[82:org.springframework.osgi.core:1.2.1]

          at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[82:org.springframework.osgi.core:1.2.1]

          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[82:org.springframework.osgi.core:1.2.1]

          at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[85:org.springframework.osgi.extender:1.2.1]

          at java.lang.Thread.run(Thread.java:679)[:1.6.0_24]

      Caused by: org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while commiting the transaction

          at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:476)[197:org.springframework.orm:3.0.6.RELEASE]

          at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)[102:org.springframework.transaction:3.0.6.RELEASE]

          at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)[102:org.springframework.transaction:3.0.6.RELEASE]

          at org.drools.container.spring.beans.persistence.DroolsSpringTransactionManager.commit(DroolsSpringTransactionManager.java:65)[51:drools-spring:5.4.0.Final]

          ... 20 more

      Caused by: javax.persistence.RollbackException: Error while commiting the transaction

          at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:71)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:467)[197:org.springframework.orm:3.0.6.RELEASE]

          ... 23 more

      Caused by: java.lang.NullPointerException

          at org.jbpm.process.instance.impl.ProcessInstanceImpl.getProcess(ProcessInstanceImpl.java:67)[199:org.jbpm.flow.core:5.3.0.Final]

          at org.jbpm.persistence.processinstance.ProcessInstanceInfo.update(ProcessInstanceInfo.java:192)[202:lt.project.osgi.org.jbpm.jbpm-persistence-jpa:5.3.0.Final]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:616)[:1.6.0_24]

          at org.hibernate.ejb.event.BeanCallback.invoke(BeanCallback.java:23)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:80)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.ejb.event.EntityCallbackHandler.preUpdate(EntityCallbackHandler.java:65)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.ejb.event.EJB3FlushEntityEventListener.invokeInterceptor(EJB3FlushEntityEventListener.java:41)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:330)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:270)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:151)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:49)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:366)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)[222:com.springsource.org.hibernate:3.3.2.GA]

          at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)[222:com.springsource.org.hibernate:3.3.2.GA]

          ... 24 more

       

       

      2014-03-25:

      As  it was figured out it is related to the process persistence. Always backup jbpm database, especially blob containing process current statuses before making any major updates