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
  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 | 8 months 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

  5. 0

    Connection reset and Socket closed exceptions while connecting to SQL Server 2008 database

    apache.org | 1 year ago
    java.sql.SQLException: Already closed. at org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:84) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:189) at com.foo.dataimport.transformer.MyTransformer.myMethod2(MyTransformer.java:202) at com.foo.dataimport.transformer.MyTransformer.myMethod1(MyTransformer.java:108) at com.foo.dataimport.eventlistener.MyDataImportEventListenerStart.onEvent(MyDataImportEventListenerStart.java:19) at org.apache.solr.handler.dataimport.DocBuilder.notifyListener(DocBuilder.java:163) at org.apache.solr.handler.dataimport.DocBuilder.invokeEventListener(DocBuilder.java:150) at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:191) at org.apache.solr.handler.dataimport.DataImporter.doDeltaImport(DataImporter.java:390) at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:429) at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408) ***************************************** Exception stack trace ***************************************** at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72) at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:255) at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210) at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39) at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59) at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73) at org.apache.solr.handler.dataimport.ThreadedEntityProcessorWrapper.nextRow(ThreadedEntityProcessorWrapper.java:84) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.runAThread(DocBuilder.java:514) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.run(DocBuilder.java:452) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.runAThread(DocBuilder.java:610) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.access$000(DocBuilder.java:399) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner$1.run(DocBuilder.java:459)
  6. 0

    [Tomcat-users] Connection reset and Socket closed exceptions while connecting to SQL Server 2008 database - Grokbase

    grokbase.com | 8 months ago
    java.sql.SQLException: Already closed. at org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:84) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:189) at com.foo.dataimport.transformer.MyTransformer.myMethod2(MyTransformer.java:202) at com.foo.dataimport.transformer.MyTransformer.myMethod1(MyTransformer.java:108) at com.foo.dataimport.eventlistener.MyDataImportEventListenerStart.onEvent(MyDataImportEventListenerStart.java:19) at org.apache.solr.handler.dataimport.DocBuilder.notifyListener(DocBuilder.java:163) at org.apache.solr.handler.dataimport.DocBuilder.invokeEventListener(DocBuilder.java:150) at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:191) at org.apache.solr.handler.dataimport.DataImporter.doDeltaImport(DataImporter.java:390) at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:429) at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408) ***************************************** Exception stack trace ***************************************** at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72) at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.(JdbcDataSource.java:210) at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39) at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59) at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73) at org.apache.solr.handler.dataimport.ThreadedEntityProcessorWrapper.nextRow(ThreadedEntityProcessorWrapper.java:84) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.runAThread(DocBuilder.java:514) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.run(DocBuilder.java:452) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.runAThread(DocBuilder.java:610) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.access$000(DocBuilder.java:399) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner$1.run(DocBuilder.java:459)

    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

      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