java.sql.SQLException: Cannot close a connection while a transaction is still active.

JFrog JIRA | dario louzado | 2 years 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

    I'm testing new version 3.4.1. I start a maven build with an empty local repo. After a couple of artifact requests, I see the following error in derby.log: ---------------------------------------------------------------- Wed Nov 05 09:39:11 BRST 2014: Booting Derby version The Apache Software Foundation - Apache Derby - 10.9.1.0 - (1344872): instance a816c00e-0149-7fc0-51bb-0000047c4f38 on database directory /home/dlouzado/artifactory-home/data/derby with class loader WebappClassLoader^M context: /artifactory^M delegate: false^M repositories:^M /WEB-INF/classes/^M ----------> Parent Classloader:^M org.apache.catalina.loader.StandardClassLoader@71060c3e^M Loaded from file:/home/dlouzado/apache-tomcat-7.0.56/webapps/artifactory/WEB-INF/lib/derby-10.9.1.0.jar java.vendor=Oracle Corporation java.runtime.version=1.7.0_67-b01 user.dir=/home/dlouzado/apache-tomcat-7.0.56 derby.system.home=null derby.stream.error.file=/home/dlouzado/artifactory-home/logs/derby.log Database Class Loader started - derby.database.classpath='' Wed Nov 05 09:45:41 BRST 2014 Thread[PoolCleaner[1107321498:1415187551317],5,main] ERROR 25001: Cannot close a connection while a transaction is still active. java.sql.SQLException: Cannot close a connection while a transaction is still active. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.checkForTransactionInProgress(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source) at org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:331) at org.apache.tomcat.jdbc.pool.PooledConnection.release(PooledConnection.java:496) at org.apache.tomcat.jdbc.pool.ConnectionPool.release(ConnectionPool.java:582) at org.apache.tomcat.jdbc.pool.ConnectionPool.checkIdle(ConnectionPool.java:1000) at org.apache.tomcat.jdbc.pool.ConnectionPool.checkIdle(ConnectionPool.java:981) at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1348) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Caused by: java.sql.SQLException: Cannot close a connection while a transaction is still active. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 15 more

    JFrog JIRA | 2 years ago | dario louzado
    java.sql.SQLException: Cannot close a connection while a transaction is still active.
  2. 0

    I'm testing new version 3.4.1. I start a maven build with an empty local repo. After a couple of artifact requests, I see the following error in derby.log: ---------------------------------------------------------------- Wed Nov 05 09:39:11 BRST 2014: Booting Derby version The Apache Software Foundation - Apache Derby - 10.9.1.0 - (1344872): instance a816c00e-0149-7fc0-51bb-0000047c4f38 on database directory /home/dlouzado/artifactory-home/data/derby with class loader WebappClassLoader^M context: /artifactory^M delegate: false^M repositories:^M /WEB-INF/classes/^M ----------> Parent Classloader:^M org.apache.catalina.loader.StandardClassLoader@71060c3e^M Loaded from file:/home/dlouzado/apache-tomcat-7.0.56/webapps/artifactory/WEB-INF/lib/derby-10.9.1.0.jar java.vendor=Oracle Corporation java.runtime.version=1.7.0_67-b01 user.dir=/home/dlouzado/apache-tomcat-7.0.56 derby.system.home=null derby.stream.error.file=/home/dlouzado/artifactory-home/logs/derby.log Database Class Loader started - derby.database.classpath='' Wed Nov 05 09:45:41 BRST 2014 Thread[PoolCleaner[1107321498:1415187551317],5,main] ERROR 25001: Cannot close a connection while a transaction is still active. java.sql.SQLException: Cannot close a connection while a transaction is still active. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.checkForTransactionInProgress(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source) at org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:331) at org.apache.tomcat.jdbc.pool.PooledConnection.release(PooledConnection.java:496) at org.apache.tomcat.jdbc.pool.ConnectionPool.release(ConnectionPool.java:582) at org.apache.tomcat.jdbc.pool.ConnectionPool.checkIdle(ConnectionPool.java:1000) at org.apache.tomcat.jdbc.pool.ConnectionPool.checkIdle(ConnectionPool.java:981) at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1348) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Caused by: java.sql.SQLException: Cannot close a connection while a transaction is still active. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 15 more

    JFrog JIRA | 2 years ago | dario louzado
    java.sql.SQLException: Cannot close a connection while a transaction is still active.
  3. 0

    BoneCP & Derby - How to properly shutdown

    Stack Overflow | 4 years ago | Stephane Grenier
    java.sql.SQLException: Cannot close a connection while a transaction is still active.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    SQLException thrown when GETting a Beer object from the database

    GitHub | 2 years ago | jcoady9
    java.sql.SQLException: Cannot close a connection while a transaction is still active.
  6. 0

    SQLSyntaxException when posting new MixedDrink to database

    GitHub | 2 years ago | jcoady9
    java.sql.SQLException: Cannot close a connection while a transaction is still active.

  1. davidvanlaatum 1 times, last 6 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLException

    Cannot close a connection while a transaction is still active.

    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException()
  2. Derby
    EmbedConnection.close
    1. org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    2. org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
    3. org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
    4. org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    5. org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    6. org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    7. org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
    8. org.apache.derby.impl.jdbc.EmbedConnection.checkForTransactionInProgress(Unknown Source)
    9. org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source)
    9 frames
  3. org.apache.tomcat
    ConnectionPool$PoolCleaner.run
    1. org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:331)
    2. org.apache.tomcat.jdbc.pool.PooledConnection.release(PooledConnection.java:496)
    3. org.apache.tomcat.jdbc.pool.ConnectionPool.release(ConnectionPool.java:582)
    4. org.apache.tomcat.jdbc.pool.ConnectionPool.checkIdle(ConnectionPool.java:1000)
    5. org.apache.tomcat.jdbc.pool.ConnectionPool.checkIdle(ConnectionPool.java:981)
    6. org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1348)
    6 frames
  4. Java RT
    TimerThread.run
    1. java.util.TimerThread.mainLoop(Timer.java:555)
    2. java.util.TimerThread.run(Timer.java:505)
    2 frames