org.hibernate.TransactionException

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.

  • Throwing a RuntimeException in a method in a proxied object before any database activity occurs causes a TransactionSystemException to be thrown when Spring attempts to roll back a transaction that hasn't started yet. Stack trace: org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC rollback failed org.hibernate.TransactionException: JDBC rollback failed at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:150) at org.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:603) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:583) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:560) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCloseTransactionAfterThrowing(TransactionAspectSupport.java:285) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) [...] Caused by: java.sql.SQLException: rollback() should not be called while in auto-commit mode. at net.sourceforge.jtds.jdbc.ConnectionJDBC2.rollback(ConnectionJDBC2.java:1989) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:535) at org.jboss.resource.adapter.jdbc.WrappedConnection.rollback(WrappedConnection.java:460) at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:163) at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:142) ... 54 more In trying to reproduce this locally, it seems that the JBoss resource adapter may be the source of the problem because I can't get the problem to reproduce wihtout running it under JBoss. This code, if created within a proxied object, should have reproduced the error: @Transactional public void myTransactionalProxiedMethod() { throw new RuntimeException("No database access has occurred yet."); }
    via by David D. Kilzer,
  • Throwing a RuntimeException in a method in a proxied object before any database activity occurs causes a TransactionSystemException to be thrown when Spring attempts to roll back a transaction that hasn't started yet. Stack trace: org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC rollback failed org.hibernate.TransactionException: JDBC rollback failed at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:150) at org.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:603) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:583) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:560) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCloseTransactionAfterThrowing(TransactionAspectSupport.java:285) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) [...] Caused by: java.sql.SQLException: rollback() should not be called while in auto-commit mode. at net.sourceforge.jtds.jdbc.ConnectionJDBC2.rollback(ConnectionJDBC2.java:1989) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:535) at org.jboss.resource.adapter.jdbc.WrappedConnection.rollback(WrappedConnection.java:460) at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:163) at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:142) ... 54 more In trying to reproduce this locally, it seems that the JBoss resource adapter may be the source of the problem because I can't get the problem to reproduce wihtout running it under JBoss. This code, if created within a proxied object, should have reproduced the error: @Transactional public void myTransactionalProxiedMethod() { throw new RuntimeException("No database access has occurred yet."); }
    via by David D. Kilzer,
  • H2 Database - Rollback failure
    via by Unknown author,
  • Beginners Corner « WebLogic
    via by Unknown author,
    • org.hibernate.TransactionException: JDBC rollback failed at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:150) at org.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:603) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:583) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:560) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCloseTransactionAfterThrowing(TransactionAspectSupport.java:285) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,