cancel
Showing results for 
Search instead for 
Did you mean: 

Could not commit JPA transaction

syedarif
Champ in-the-making
Champ in-the-making

we are  facing the below issue for few cases, unable to reproduce the scenario. looking for help form the community

011at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
#011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
#011at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
#011... 166 more
2018-01-30 14:00:22,396 ERROR o.a.e.i.a.ExecuteAsyncRunnable [SimpleAsyncTaskExecutor-419] Job 2007545 failed
org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly
#011at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:526) ~[spring-orm-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
#011at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761) ~[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
#011at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730) ~[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
#011at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150) ~[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
#011at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) ~[activiti-spring-5.20.0.jar!/:5.20.0]
#011at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31) ~[activiti-engine-5.20.0.jar!/:5.20.0]
#011at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40) ~[activiti-engine-5.20.0.jar!/:5.20.0]
#011at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35) ~[activiti-engine-5.20.0.jar!/:5.20.0]
#011at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.executeJob(ExecuteAsyncRunnable.java:95) [activiti-engine-5.20.0.jar!/:5.20.0]
#011at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:50) [activiti-engine-5.20.0.jar!/:5.20.0]
#011at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
Caused by: javax.persistence.RollbackException: Transaction marked as rollbackOnly
#011at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:74) ~[hibernate-entitymanager-4.3.11.Final.jar!/:4.3.11.Final]
#011at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517) ~[spring-orm-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
#011... 10 more

1 REPLY 1

ryandawson
Elite Collaborator
Elite Collaborator

Could you share some more information about what version you're using, what your BPM process does and what the particular task does that is failing (ideally including any source code snippets).