java.sql.SQLException: The transaction is no longer active - status: 'Committed'. No further JDBC access is allowed within this transaction.

Spring JIRA | Tomasz Wysocki | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The spring's context contains JTATransactionManager set up with WebLogic's TM JNDI location, and of course a JNDI datasource. I also use weblogic's XA wrappers around plain Oracle (non-XA) connections. Below is a fragment of a exception's stacktrace I got in weblogic jdbc.log (jdbc debug feature turned on). This exception seems to be swallowed by weblogic itself, as it does not appear in any other logs. I can't say if it affects how weblogic manages connections. Also weblogic connection profiling shows no leaked connections. Classic "dao" approach is to close connection in the same method that it was obtained from datasource, within a "finally" block. And for sure within a transaction scope. Just wondering if it is allowable in J2EE environment to close connections after associated transaction has been finished (commited/rolledback). Here goes an exception: java.sql.SQLException: The transaction is no longer active - status: 'Committed'. No further JDBC access is allowed within this transaction. at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:118) at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:127) at weblogic.jdbc.wrapper.Connection.preInvocationHandler(Connection.java:70) at weblogic.jdbc.wrapper.JTSConnection_oracle_jdbc_driver_OracleConnection.getWarnings(Unknown Source) at net.sf.hibernate.impl.BatcherImpl.closeConnection(BatcherImpl.java:297) at net.sf.hibernate.impl.SessionImpl.disconnect(SessionImpl.java:3352) at net.sf.hibernate.impl.SessionImpl.close(SessionImpl.java:576) at org.springframework.orm.hibernate.SessionFactoryUtils.doClose(SessionFactoryUtils.java:651) at org.springframework.orm.hibernate.SessionFactoryUtils.closeSessionOrRegisterDeferredClose(SessionFactoryUtils.java:640) at org.springframework.orm.hibernate.SessionFactoryUtils.access$300(SessionFactoryUtils.java:86) at org.springframework.orm.hibernate.SessionFactoryUtils$SpringSessionSynchronization.afterCompletion(SessionFactoryUtils.java:804) at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:547) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:408) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:242) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:66) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:143) at org.springframework.aop.interceptor.PerformanceMonitorInterceptor.invoke(PerformanceMonitorInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:143) at

    Spring JIRA | 1 decade ago | Tomasz Wysocki
    java.sql.SQLException: The transaction is no longer active - status: 'Committed'. No further JDBC access is allowed within this transaction.
  2. 0

    The spring's context contains JTATransactionManager set up with WebLogic's TM JNDI location, and of course a JNDI datasource. I also use weblogic's XA wrappers around plain Oracle (non-XA) connections. Below is a fragment of a exception's stacktrace I got in weblogic jdbc.log (jdbc debug feature turned on). This exception seems to be swallowed by weblogic itself, as it does not appear in any other logs. I can't say if it affects how weblogic manages connections. Also weblogic connection profiling shows no leaked connections. Classic "dao" approach is to close connection in the same method that it was obtained from datasource, within a "finally" block. And for sure within a transaction scope. Just wondering if it is allowable in J2EE environment to close connections after associated transaction has been finished (commited/rolledback). Here goes an exception: java.sql.SQLException: The transaction is no longer active - status: 'Committed'. No further JDBC access is allowed within this transaction. at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:118) at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:127) at weblogic.jdbc.wrapper.Connection.preInvocationHandler(Connection.java:70) at weblogic.jdbc.wrapper.JTSConnection_oracle_jdbc_driver_OracleConnection.getWarnings(Unknown Source) at net.sf.hibernate.impl.BatcherImpl.closeConnection(BatcherImpl.java:297) at net.sf.hibernate.impl.SessionImpl.disconnect(SessionImpl.java:3352) at net.sf.hibernate.impl.SessionImpl.close(SessionImpl.java:576) at org.springframework.orm.hibernate.SessionFactoryUtils.doClose(SessionFactoryUtils.java:651) at org.springframework.orm.hibernate.SessionFactoryUtils.closeSessionOrRegisterDeferredClose(SessionFactoryUtils.java:640) at org.springframework.orm.hibernate.SessionFactoryUtils.access$300(SessionFactoryUtils.java:86) at org.springframework.orm.hibernate.SessionFactoryUtils$SpringSessionSynchronization.afterCompletion(SessionFactoryUtils.java:804) at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:547) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:408) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:242) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:66) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:143) at org.springframework.aop.interceptor.PerformanceMonitorInterceptor.invoke(PerformanceMonitorInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:143) at

    Spring JIRA | 1 decade ago | Tomasz Wysocki
    java.sql.SQLException: The transaction is no longer active - status: 'Committed'. No further JDBC access is allowed within this transaction.
  3. 0

    Hibernate Community • View topic - minimal spring + hibernate - transaction question

    hibernate.org | 1 year ago
    java.sql.SQLException: The transaction is no longer active - status: 'Committed'. No further JDBC access is al lowed within this transaction.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      The transaction is no longer active - status: 'Committed'. No further JDBC access is allowed within this transaction.

      at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack()
    2. weblogic.jdbc.wrapper
      JTSConnection_oracle_jdbc_driver_OracleConnection.getWarnings
      1. weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:118)
      2. weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:127)
      3. weblogic.jdbc.wrapper.Connection.preInvocationHandler(Connection.java:70)
      4. weblogic.jdbc.wrapper.JTSConnection_oracle_jdbc_driver_OracleConnection.getWarnings(Unknown Source)
      4 frames
    3. net.sf.hibernate
      SessionImpl.close
      1. net.sf.hibernate.impl.BatcherImpl.closeConnection(BatcherImpl.java:297)
      2. net.sf.hibernate.impl.SessionImpl.disconnect(SessionImpl.java:3352)
      3. net.sf.hibernate.impl.SessionImpl.close(SessionImpl.java:576)
      3 frames
    4. Hibernate
      SessionFactoryUtils$SpringSessionSynchronization.afterCompletion
      1. org.springframework.orm.hibernate.SessionFactoryUtils.doClose(SessionFactoryUtils.java:651)
      2. org.springframework.orm.hibernate.SessionFactoryUtils.closeSessionOrRegisterDeferredClose(SessionFactoryUtils.java:640)
      3. org.springframework.orm.hibernate.SessionFactoryUtils.access$300(SessionFactoryUtils.java:86)
      4. org.springframework.orm.hibernate.SessionFactoryUtils$SpringSessionSynchronization.afterCompletion(SessionFactoryUtils.java:804)
      4 frames
    5. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:547)
      2. org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:408)
      3. org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:242)
      4. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:66)
      4 frames
    6. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:143)
      2. org.springframework.aop.interceptor.PerformanceMonitorInterceptor.invoke(PerformanceMonitorInterceptor.java:50)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:143)
      3 frames