tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException : Cannot get a connection, pool error Timeout waiting for idle object
Date Sun, 12 Aug 2007 13:50:52 GMT
Just for laughs and giggles could you set maxActive to anything other 
than zero?  A negative number means no limit if that's what you're 
after.  I'm not sure how zero is evaluated and the javadocs for DBCP's  
BasicDataSource aren't 100% clear.

--David

fusion35 wrote:
> context.xml :
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- The contents of this file will be loaded for each web application -->
> <Context path="/PAF" reloadable="true" crossContext="true">
>   <Resource auth="Container" defaultAutoCommit="false"
> driverClassName="com.mysql.jdbc.Driver" maxActive="0" maxWait="1000"
> name="jdbc/PAFDB" password="root" timeBetweenEvictionRunsMillis="60000"
> type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/pafdb"
> username="root"/>
> </Context>
>
>
> The log of error is as under :
>
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection,
> pool error Timeout waiting for idle object
> 	at
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)
> 	at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at bsh.Reflect.invokeMethod(Unknown Source)
> 	at bsh.Reflect.invokeObjectMethod(Unknown Source)
> 	at bsh.Name.invokeMethod(Unknown Source)
> 	at bsh.BSHMethodInvocation.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.BSHAssignment.eval(Unknown Source)
> 	at bsh.BSHBlock.evalBlock(Unknown Source)
> 	at bsh.BSHBlock.eval(Unknown Source)
> 	at bsh.BSHBlock.eval(Unknown Source)
> 	at bsh.BSHTryStatement.eval(Unknown Source)
> 	at bsh.BSHBlock.evalBlock(Unknown Source)
> 	at bsh.BSHBlock.eval(Unknown Source)
> 	at bsh.BshMethod.invokeImpl(Unknown Source)
> 	at bsh.BshMethod.invoke(Unknown Source)
> 	at bsh.BshMethod.invoke(Unknown Source)
> 	at bsh.Name.invokeLocalMethod(Unknown Source)
> 	at bsh.Name.invokeMethod(Unknown Source)
> 	at bsh.BSHMethodInvocation.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.Interpreter.eval(Unknown Source)
> 	at bsh.Interpreter.eval(Unknown Source)
> 	at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:80)
> 	at
> org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:283)
> 	at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:727)
> 	at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:170)
> 	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
> 	at
> org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:452)
> 	at
> org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:370)
> Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
> 	at
> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:825)
> 	at
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
> 	... 35 more
> Data Source : org.apache.tomcat.dbcp.dbcp.BasicDataSource@28305d
> Conn before : null
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection,
> pool error Timeout waiting for idle object
> 	at
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)
> 	at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at bsh.Reflect.invokeMethod(Unknown Source)
> 	at bsh.Reflect.invokeObjectMethod(Unknown Source)
> 	at bsh.Name.invokeMethod(Unknown Source)
> 	at bsh.BSHMethodInvocation.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.BSHAssignment.eval(Unknown Source)
> 	at bsh.BSHBlock.evalBlock(Unknown Source)
> 	at bsh.BSHBlock.eval(Unknown Source)
> 	at bsh.BSHBlock.eval(Unknown Source)
> 	at bsh.BSHTryStatement.eval(Unknown Source)
> 	at bsh.BSHBlock.evalBlock(Unknown Source)
> 	at bsh.BSHBlock.eval(Unknown Source)
> 	at bsh.BshMethod.invokeImpl(Unknown Source)
> 	at bsh.BshMethod.invoke(Unknown Source)
> 	at bsh.BshMethod.invoke(Unknown Source)
> 	at bsh.Name.invokeLocalMethod(Unknown Source)
> 	at bsh.Name.invokeMethod(Unknown Source)
> 	at bsh.BSHMethodInvocation.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.Interpreter.eval(Unknown Source)
> 	at bsh.Interpreter.eval(Unknown Source)
> 	at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:80)
> 	at
> org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:283)
> 	at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:727)
> 	at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:170)
> 	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
> 	at
> org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:452)
> 	at
> org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:370)
> Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
> 	at
> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:825)
> 	at
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
> 	... 35 more
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message