org.springframework.transaction.TransactionSystemException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When querying then `merge()`-ing an entity without `@Version`, Hibernate throws NPE: {code} 14:50:36.200 ERROR | | | eduler_Worker-10 | o.h.AssertionFailure | HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): java.lang.NullPointerException 14:50:36.202 ERROR | | | eduler_Worker-10 | i.c.b.c.ExpireCartLineJob | Can not to cancel cartLine for cart 52ce397d-91f5-43fe-a8d0-027db3ac938d line 71e4995c-15e9-4d7a-acb6-8c9497bdd868 at scheduled Wed Oct 29 03:20:02 VET 2014: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:524) ~[spring-orm-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757) ~[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726) ~[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150) ~[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE] at id.co.bippo.cart.JpaCartManagerImpl.expireCartLine(JpaCartManagerImpl.java:789) ~[classes/:na] at id.co.bippo.cart.ExpireCartLineJob.doExecute(ExpireCartLineJob.java:81) ~[classes/:na] at org.soluvas.schedule.TenantJob.execute(TenantJob.java:117) [classes/:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.1.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) ~[quartz-2.2.1.jar:na] Caused by: javax.persistence.RollbackException: Error while committing the transaction at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:94) ~[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final] at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:515) ~[spring-orm-4.1.0.RELEASE.jar:4.1.0.RELEASE] ... 8 common frames omitted Caused by: org.hibernate.AssertionFailure: Unable to perform beforeTransactionCompletion callback at org.hibernate.engine.spi.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:721) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.spi.ActionQueue.beforeTransactionCompletion(ActionQueue.java:389) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:516) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:105) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:77) ~[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final] ... 9 common frames omitted Caused by: java.lang.NullPointerException: null at org.hibernate.action.internal.EntityVerifyVersionProcess.doBeforeTransactionCompletion(EntityVerifyVersionProcess.java:59) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.spi.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:715) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] ... 14 common frames omitted {code} Hibernate should throw an exception with technical explanation reason of the failure, for example whether a required annotation is missing. Similar issues: 1. https://developer.jboss.org/thread/173302?_sscc=t 2. http://stackoverflow.com/questions/5727565/hibernate-throws-nullpointerexception-in-entityverifyversionprocess Tag [~ceefour]
    via by Rudi Wijaya,
  • When querying then `merge()`-ing an entity without `@Version`, Hibernate throws NPE: {code} 14:50:36.200 ERROR | | | eduler_Worker-10 | o.h.AssertionFailure | HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): java.lang.NullPointerException 14:50:36.202 ERROR | | | eduler_Worker-10 | i.c.b.c.ExpireCartLineJob | Can not to cancel cartLine for cart 52ce397d-91f5-43fe-a8d0-027db3ac938d line 71e4995c-15e9-4d7a-acb6-8c9497bdd868 at scheduled Wed Oct 29 03:20:02 VET 2014: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:524) ~[spring-orm-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757) ~[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726) ~[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150) ~[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE] at id.co.bippo.cart.JpaCartManagerImpl.expireCartLine(JpaCartManagerImpl.java:789) ~[classes/:na] at id.co.bippo.cart.ExpireCartLineJob.doExecute(ExpireCartLineJob.java:81) ~[classes/:na] at org.soluvas.schedule.TenantJob.execute(TenantJob.java:117) [classes/:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.1.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) ~[quartz-2.2.1.jar:na] Caused by: javax.persistence.RollbackException: Error while committing the transaction at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:94) ~[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final] at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:515) ~[spring-orm-4.1.0.RELEASE.jar:4.1.0.RELEASE] ... 8 common frames omitted Caused by: org.hibernate.AssertionFailure: Unable to perform beforeTransactionCompletion callback at org.hibernate.engine.spi.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:721) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.spi.ActionQueue.beforeTransactionCompletion(ActionQueue.java:389) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:516) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:105) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:77) ~[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final] ... 9 common frames omitted Caused by: java.lang.NullPointerException: null at org.hibernate.action.internal.EntityVerifyVersionProcess.doBeforeTransactionCompletion(EntityVerifyVersionProcess.java:59) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.spi.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:715) ~[hibernate-core-4.3.6.Final.jar:4.3.6.Final] ... 14 common frames omitted {code} Hibernate should throw an exception with technical explanation reason of the failure, for example whether a required annotation is missing. Similar issues: 1. https://developer.jboss.org/thread/173302?_sscc=t 2. http://stackoverflow.com/questions/5727565/hibernate-throws-nullpointerexception-in-entityverifyversionprocess Tag [~ceefour]
    via by Rudi Wijaya,
    • org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:524)[spring-orm-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757)[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726)[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150)[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE] at id.co.bippo.cart.JpaCartManagerImpl.expireCartLine(JpaCartManagerImpl.java:789)[classes/:na] at id.co.bippo.cart.ExpireCartLineJob.doExecute(ExpireCartLineJob.java:81)[classes/:na] at org.soluvas.schedule.TenantJob.execute(TenantJob.java:117)[classes/:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:202)[quartz-2.2.1.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)[quartz-2.2.1.jar:na] Caused by: javax.persistence.RollbackException: Error while committing the transaction at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:94)[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final] at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:515)[spring-orm-4.1.0.RELEASE.jar:4.1.0.RELEASE] ... 8 more Caused by: org.hibernate.AssertionFailure: Unable to perform beforeTransactionCompletion callback at org.hibernate.engine.spi.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:721)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.spi.ActionQueue.beforeTransactionCompletion(ActionQueue.java:389)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:516)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:105)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:77)[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final] ... 9 more Caused by: java.lang.NullPointerException: null at org.hibernate.action.internal.EntityVerifyVersionProcess.doBeforeTransactionCompletion(EntityVerifyVersionProcess.java:59)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] at org.hibernate.engine.spi.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:715)[hibernate-core-4.3.6.Final.jar:4.3.6.Final] ... 14 more
    No Bugmate found.