You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Pedro Gonçalves <pe...@yahoo.com.br> on 2005/04/07 21:29:36 UTC

Pool and DBCP : Pool not Open

Hi,

I have an application that uses dbcp 1.2.1, pool 1.2,
tomcat 5 and mysql...
in the middle of process the following erro occurs:

java.lang.IllegalStateException: Pool not open
	at
org.apache.commons.pool.BaseObjectPool.assertOpen(BaseObjectPool.java:78)
	at
org.apache.commons.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:853)
	at
org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:80)
	at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:180)

and my data source configuration:

<set-property property="maxActive" value="20"/>
<set-property property="testOnBorrow" value="true"/>
<set-property property="testOnReturn" value="false"/>
<set-property property="validationQuery" value="SELECT
1"/> 
<set-property property="removeAbandoned"
value="false"/> 
<set-property property="maxCount" value="20"/>
<set-property property="minCount" value="5"/>
<set-property property="timeBetweenEvictionRunsMillis"
value="600000"/>
<set-property property="minEvictableIdleTimeMillis"
value="600000"/>
<set-property property="maxIdle" value="2"/>
<set-property property="minIdle" value="1"/>
<set-property property="maxWait" value="-1"/> 
<set-property property="testWhileIdle" value="true"/>

anything wrong?

thanks...


Pedro Gonçalves de Oliveira






	
	
		
Yahoo! Acesso Grátis - Internet rápida e grátis. 
Instale o discador agora! http://br.acesso.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Pool and DBCP : Pool not Open

Posted by Dirk Verbeeck <di...@pandora.be>.
The "Pool not open" Exception is thrown when the pool has been closed, 
either directly or indirectly, close() on the pool or datasource.

Once the close method has been called the pool/PoolingDataSource 
cannot be used anymore and has to be recreated/initialized.

Are you using the JNDI way of obtaining a datasource from tomcat or 
are you creating one yourself?

-- Dirk


Pedro Gonçalves wrote:
> Hi,
> 
> I have an application that uses dbcp 1.2.1, pool 1.2,
> tomcat 5 and mysql...
> in the middle of process the following erro occurs:
> 
> java.lang.IllegalStateException: Pool not open
> 	at
> org.apache.commons.pool.BaseObjectPool.assertOpen(BaseObjectPool.java:78)
> 	at
> org.apache.commons.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:853)
> 	at
> org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:80)
> 	at
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:180)
> 
> and my data source configuration:
> 
> <set-property property="maxActive" value="20"/>
> <set-property property="testOnBorrow" value="true"/>
> <set-property property="testOnReturn" value="false"/>
> <set-property property="validationQuery" value="SELECT
> 1"/> 
> <set-property property="removeAbandoned"
> value="false"/> 
> <set-property property="maxCount" value="20"/>
> <set-property property="minCount" value="5"/>
> <set-property property="timeBetweenEvictionRunsMillis"
> value="600000"/>
> <set-property property="minEvictableIdleTimeMillis"
> value="600000"/>
> <set-property property="maxIdle" value="2"/>
> <set-property property="minIdle" value="1"/>
> <set-property property="maxWait" value="-1"/> 
> <set-property property="testWhileIdle" value="true"/>
> 
> anything wrong?
> 
> thanks...
> 
> 
> Pedro Gonçalves de Oliveira



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org