com.ibm.db2.jcc.b.SqlException: ... java.sql.Connextion.close() requested while a transaction is in progress on the connection. The transaction remains active, and the connection cannot be closed. ERRORCODE=-4471, SQLSTATE=null ... // obfuscated calls from com.ibm.db2.jcc.b.*

Hibernate JIRA | Julien Kronegg | 8 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    When doing a hbm2java ant task to generate entities from the database, an exception occurs when closing the connection pool if transactions are used. INFO: cleaning up connection pool: jdbc:db2://192.168.17.12:8801/TES1 org.hibernate.connection.DriverManagerConnectionProvider close WARNING: problem closing pooled connection Throwable occured: com.ibm.db2.jcc.b.SqlException: ... java.sql.Connextion.close() requested while a transaction is in progress on the connection. The transaction remains active, and the connection cannot be closed. ERRORCODE=-4471, SQLSTATE=null ... // obfuscated calls from com.ibm.db2.jcc.b.* at org.ibm.db2.jcc.b.jb.close(jb.java:1089) at org.hibernate.connection.DriverManagerConnectionProvider.close(DriverManagerConnectionProvider:175) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder:95) ... at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask:43) This is only a warning and the hbm2java ant task do the Java file generation correctly. However, this warning make think about a problem when generating the entities from the database. The solution may be to commit/rollback the transaction (if any) before closing the connection pool. This could be done in JDBCBinder.readFromDatabase() or in the DriverManagerConnectionProvider.close() methods. Workaround: ----------------- Set the following property in the hibernate properties file used for the ant task: hibernate.connection.autocommit=true

    Hibernate JIRA | 8 years ago | Julien Kronegg
    com.ibm.db2.jcc.b.SqlException: ... java.sql.Connextion.close() requested while a transaction is in progress on the connection. The transaction remains active, and the connection cannot be closed. ERRORCODE=-4471, SQLSTATE=null ... // obfuscated calls from com.ibm.db2.jcc.b.*
  2. 0

    When doing a hbm2java ant task to generate entities from the database, an exception occurs when closing the connection pool if transactions are used. INFO: cleaning up connection pool: jdbc:db2://192.168.17.12:8801/TES1 org.hibernate.connection.DriverManagerConnectionProvider close WARNING: problem closing pooled connection Throwable occured: com.ibm.db2.jcc.b.SqlException: ... java.sql.Connextion.close() requested while a transaction is in progress on the connection. The transaction remains active, and the connection cannot be closed. ERRORCODE=-4471, SQLSTATE=null ... // obfuscated calls from com.ibm.db2.jcc.b.* at org.ibm.db2.jcc.b.jb.close(jb.java:1089) at org.hibernate.connection.DriverManagerConnectionProvider.close(DriverManagerConnectionProvider:175) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder:95) ... at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask:43) This is only a warning and the hbm2java ant task do the Java file generation correctly. However, this warning make think about a problem when generating the entities from the database. The solution may be to commit/rollback the transaction (if any) before closing the connection pool. This could be done in JDBCBinder.readFromDatabase() or in the DriverManagerConnectionProvider.close() methods. Workaround: ----------------- Set the following property in the hibernate properties file used for the ant task: hibernate.connection.autocommit=true

    Hibernate JIRA | 8 years ago | Julien Kronegg
    com.ibm.db2.jcc.b.SqlException: ... java.sql.Connextion.close() requested while a transaction is in progress on the connection. The transaction remains active, and the connection cannot be closed. ERRORCODE=-4471, SQLSTATE=null ... // obfuscated calls from com.ibm.db2.jcc.b.*

    Root Cause Analysis

    1. com.ibm.db2.jcc.b.SqlException

      ... java.sql.Connextion.close() requested while a transaction is in progress on the connection. The transaction remains active, and the connection cannot be closed. ERRORCODE=-4471, SQLSTATE=null ... // obfuscated calls from com.ibm.db2.jcc.b.*

      at org.ibm.db2.jcc.b.jb.close()
    2. org.ibm.db2
      jb.close
      1. org.ibm.db2.jcc.b.jb.close(jb.java:1089)
      1 frame
    3. Hibernate
      DriverManagerConnectionProvider.close
      1. org.hibernate.connection.DriverManagerConnectionProvider.close(DriverManagerConnectionProvider:175)
      1 frame
    4. Hibernate
      JDBCBinder.readFromDatabase
      1. org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder:95)
      1 frame