• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DBCP : Jdbc3Connection is closed

 
elmadkouri youness
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
used Apache DBCP API for pool connections. At start up all function error, but after the clean sessions that are not closed "hibernate.dbcp.removeAbandoned"= "true", I get the following error message:

Caused by: java.sql.SQLException: Connection org.postgresql.jdbc3.Jdbc3Connection@20941296 is closed. at org.apache.commons.dbcp.DelegatingConnection.checkOpen(DelegatingConnection.java:398) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:279) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561) at org.hibernate.loader.Loader.doQuery(Loader.java:661) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)


My configuration:

<property name="hibernate.dbcp.validationQuery">select 1</property>
<property name="hibernate.dbcp.initialSize">10</property>
<property name="hibernate.dbcp.maxActive">100</property>
<property name="hibernate.dbcp.maxIdle">80</property>
<property name="hibernate.dbcp.minIdle">10</property>
<property name="hibernate.dbcp.maxWait">40000</property>
<property name="hibernate.dbcp.testOnReturn">true</property>
<property name="hibernate.dbcp.testOnBorrow">true</property>
<property name="hibernate.dbcp.testWhileIdle">true</property>
<property name="hibernate.dbcp.timeBetweenEvictionRunsMillis">420000</property>
<property name="hibernate.dbcp.minEvictableIdleTimeMillis">300000</property>
<property name="hibernate.dbcp.validationInterval">25000</property>
<property name="hibernate.dbcp.removeAbandoned">true</property>
<property name="hibernate.dbcp.removeAbandonedTimeout">50</property>
<property name="hibernate.dbcp.logAbandoned">true</property>
<property name="hibernate.dbcp.poolPreparedStatements">false</property>


Thank you for your help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic