java.sql.SQLException: Already closed. at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84 ) at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.close(Pool ingDriver.java:269) at org.dspace.storage.rdbms.DatabaseManager.freeConnection(DatabaseManager.jav a:566) at org.dspace.dao.postgres.GlobalDAOPostgres.abortTransaction(GlobalDAOPostgre s.java:105)

Sakai JIRA | Charles Kiplagat | 8 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

    Grave problem related to chooser.jsp (Or whatever code that calls it, maybe RegisteredFilter?). The problem that caused the connection pool to get exhausted in our production site can be reproduced by taking Dspace's current Trunk and enabling at least 2 Autentication methods that have loginURLs (ie.: PasswordAuthentication and LDAPAuthentication). Then just go to a page (/profile for example) where chooser.jsp is called and hit a 3 or 4 refreshs. In my machine usually it takes less than 30 secs the following message appears: 2008-11-26 18:09:57,494 ERROR org.dspace.dao.GlobalDAO @ Um erro de E/S ocorreu ao enviar para o processo do servidor. 2008-11-26 18:09:57,494 WARN org.dspace.storage.rdbms.DatabaseManager @ Already closed. 2008-11-26 18:09:57,516 ERROR org.dspace.dao.GlobalDAO @ Um erro de E/S ocorreu ao enviar para o processo do servidor. 2008-11-26 18:09:57,516 WARN org.dspace.storage.rdbms.DatabaseManager @ Already closed. And the following is outputed in the tomcat console: (might be one of the empty SQLExceptions catch where i have put e.printStackTrace(), so might not appear for you) java.sql.SQLException: Already closed. at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84 ) at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.close(Pool ingDriver.java:269) at org.dspace.storage.rdbms.DatabaseManager.freeConnection(DatabaseManager.jav a:566) at org.dspace.dao.postgres.GlobalDAOPostgres.abortTransaction(GlobalDAOPostgre s.java:105) at org.dspace.core.Context.abort(Context.java:381) at org.dspace.core.Context.finalize(Context.java:504) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) To exhaust the connection pool, use Apache's JMeter against one of these pages where choose.jsp is called: I am making the test with 20 simultaneous users and loop count of 5 (and the default 30 connections in the pool). And the pool gets exhausted very quickly.

    Sakai JIRA | 8 years ago | Charles Kiplagat
    java.sql.SQLException: Already closed. at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84 ) at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.close(Pool ingDriver.java:269) at org.dspace.storage.rdbms.DatabaseManager.freeConnection(DatabaseManager.jav a:566) at org.dspace.dao.postgres.GlobalDAOPostgres.abortTransaction(GlobalDAOPostgre s.java:105)
  2. 0

    Grave problem related to chooser.jsp (Or whatever code that calls it, maybe RegisteredFilter?). The problem that caused the connection pool to get exhausted in our production site can be reproduced by taking Dspace's current Trunk and enabling at least 2 Autentication methods that have loginURLs (ie.: PasswordAuthentication and LDAPAuthentication). Then just go to a page (/profile for example) where chooser.jsp is called and hit a 3 or 4 refreshs. In my machine usually it takes less than 30 secs the following message appears: 2008-11-26 18:09:57,494 ERROR org.dspace.dao.GlobalDAO @ Um erro de E/S ocorreu ao enviar para o processo do servidor. 2008-11-26 18:09:57,494 WARN org.dspace.storage.rdbms.DatabaseManager @ Already closed. 2008-11-26 18:09:57,516 ERROR org.dspace.dao.GlobalDAO @ Um erro de E/S ocorreu ao enviar para o processo do servidor. 2008-11-26 18:09:57,516 WARN org.dspace.storage.rdbms.DatabaseManager @ Already closed. And the following is outputed in the tomcat console: (might be one of the empty SQLExceptions catch where i have put e.printStackTrace(), so might not appear for you) java.sql.SQLException: Already closed. at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84 ) at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.close(Pool ingDriver.java:269) at org.dspace.storage.rdbms.DatabaseManager.freeConnection(DatabaseManager.jav a:566) at org.dspace.dao.postgres.GlobalDAOPostgres.abortTransaction(GlobalDAOPostgre s.java:105) at org.dspace.core.Context.abort(Context.java:381) at org.dspace.core.Context.finalize(Context.java:504) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) To exhaust the connection pool, use Apache's JMeter against one of these pages where choose.jsp is called: I am making the test with 20 simultaneous users and loop count of 5 (and the default 30 connections in the pool). And the pool gets exhausted very quickly.

    Sakai JIRA | 8 years ago | Charles Kiplagat
    java.sql.SQLException: Already closed. at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84 ) at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.close(Pool ingDriver.java:269) at org.dspace.storage.rdbms.DatabaseManager.freeConnection(DatabaseManager.jav a:566) at org.dspace.dao.postgres.GlobalDAOPostgres.abortTransaction(GlobalDAOPostgre s.java:105)
  3. 0

    DSpace Tech Support - I/O error occured while sending to the backend.

    nabble.com | 1 year ago
    java.sql.SQLException: Already closed. at > org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84) at > org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.close(PoolingDriver.java:269) at > org.dspace.storage.rdbms.DatabaseManager.freeConnection(DatabaseManager.java:566)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      Already closed. at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84 ) at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.close(Pool ingDriver.java:269) at org.dspace.storage.rdbms.DatabaseManager.freeConnection(DatabaseManager.jav a:566) at org.dspace.dao.postgres.GlobalDAOPostgres.abortTransaction(GlobalDAOPostgre s.java:105)

      at org.dspace.core.Context.abort()
    2. DSpace Kernel :: API and Implementation
      Context.finalize
      1. org.dspace.core.Context.abort(Context.java:381)
      2. org.dspace.core.Context.finalize(Context.java:504)
      2 frames
    3. Java RT
      Finalizer$FinalizerThread.run
      1. java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
      2. java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
      3. java.lang.ref.Finalizer.access$100(Finalizer.java:14)
      4. java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
      4 frames