org.springframework.transaction.TransactionSystemException

Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking

Solutions on the web300

  • Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking
  • via GitHub by gioppoluca
    , 1 year ago
    Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking
  • via xluat.com by Unknown author, 1 year ago
    Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking
  • Stack trace

    • org.springframework.transaction.TransactionSystemException: Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:548)[spring-orm-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:853)[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:830)[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:503)[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:285)[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE] at $Proxy204.afterJob(Unknown Source)[na:na] at org.springframework.batch.core.listener.CompositeJobExecutionListener.afterJob(CompositeJobExecutionListener.java:60)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE] at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:346)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE] at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE] at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE] at fr.aso.batch.OpsTest.testRecuperationEtabsEmployantSalariesCNAMJob(OpsTest.java:100)[test-classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_30] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_30] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_30] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_30] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)[junit-4.12.jar:4.12] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)[junit-4.12.jar:4.12] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)[junit-4.12.jar:4.12] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)[junit-4.12.jar:4.12] at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)[spring-test-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)[spring-test-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)[spring-test-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)[junit-4.12.jar:4.12] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:254)[spring-test-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)[spring-test-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)[junit-4.12.jar:4.12] at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)[spring-test-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)[spring-test-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)[junit-4.12.jar:4.12] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:193)[spring-test-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)[.cp/:na] at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)[.cp/:na] at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)[.cp/:na] at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)[.cp/:na] at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)[.cp/:na] at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)[.cp/:na] Caused by: javax.persistence.PersistenceException: unexpected error when rollbacking at org.hibernate.jpa.internal.TransactionImpl.rollback(TransactionImpl.java:111)[hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final] at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:544)[spring-orm-4.2.3.RELEASE.jar:4.2.3.RELEASE] ... 43 more Caused by: org.hibernate.TransactionException: rollback failed at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(AbstractTransactionImpl.java:217)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.jpa.internal.TransactionImpl.rollback(TransactionImpl.java:108)[hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final] ... 44 more Caused by: org.hibernate.TransactionException: unable to rollback against JDBC connection at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doRollback(JdbcTransaction.java:167)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(AbstractTransactionImpl.java:211)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] ... 45 more Caused by: org.postgresql.util.PSQLException: This connection has been closed. at org.postgresql.jdbc2.AbstractJdbc2Connection.checkClosed(AbstractJdbc2Connection.java:837)[postgresql-9.3-1101.jdbc4.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Connection.rollback(AbstractJdbc2Connection.java:854)[postgresql-9.3-1101.jdbc4.jar:na] at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:860)[c3p0-0.9.2.1.jar:0.9.2.1] at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doRollback(JdbcTransaction.java:163)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] ... 46 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    4 times, 1 month ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    8 more bugmates