Please use the google group to ask questions - thanks.

by zhoupeng 16 Mar 14:47
When make Paging query the connection is not closed & How to configure the JNDI of Tomcat?

Exception Info:

2010-3-16 21:16:32 com.avaje.ebean.server.lib.sql.DataSourcePool createConnection
???????????: DataSourcePool [ora] grow pool; busy[1] size[1] max[10]
select count(*) from WF_PROCESSDEFINITION f
3
2010-3-16 21:16:32 com.avaje.ebean.server.lib.sql.DataSourcePool createConnection
???????????: DataSourcePool [ora] grow pool; busy[2] size[2] max[10]
select count(*) from WF_PROCESSDEFINITION f
3
2010-3-16 21:16:32 com.avaje.ebean.server.lib.sql.DataSourcePool createConnection
???????????: DataSourcePool [ora] grow pool; busy[3] size[3] max[10]
select count(*) from WF_PROCESSDEFINITION f
3
2010-3-16 21:16:32 com.avaje.ebean.server.lib.sql.DataSourcePool createConnection
???????????: DataSourcePool [ora] grow pool; busy[4] size[4] max[10]
select count(*) from WF_PROCESSDEFINITION f
3
2010-3-16 21:16:32 com.avaje.ebean.server.lib.sql.DataSourcePool createConnection
???????????: DataSourcePool [ora] grow pool; busy[5] size[5] max[10]
select count(*) from WF_PROCESSDEFINITION f
3
2010-3-16 21:16:32 com.avaje.ebean.server.lib.sql.DataSourcePool createConnection
???????????: DataSourcePool [ora] grow pool; busy[6] size[6] max[10]
select count(*) from WF_PROCESSDEFINITION f
3
2010-3-16 21:16:32 com.avaje.ebean.server.lib.sql.DataSourcePool createConnection
???????????: DataSourcePool [ora] grow pool; busy[7] size[7] max[10]
select count(*) from WF_PROCESSDEFINITION f
3
2010-3-16 21:16:32 com.avaje.ebean.server.lib.sql.DataSourcePool createConnection
???????????: DataSourcePool [ora] grow pool; busy[8] size[8] max[10]
select count(*) from WF_PROCESSDEFINITION f
3
2010-3-16 21:16:32 com.avaje.ebean.server.lib.sql.DataSourcePool createConnection
???????????: DataSourcePool [ora] grow pool; busy[9] size[9] max[10]
select count(*) from WF_PROCESSDEFINITION f
???????????: Busy Connections:

Exception in thread "main" javax.persistence.PersistenceException: javax.persistence.PersistenceException: java.sql.SQLException: Unsuccessfully waited for a connection to be returned. No connections are free. You need to Increase the max connections or look for a connection pool leak.
at com.avaje.ebean.server.query.LimitOffsetPagingQuery.getTotalRowCount(LimitOffsetPagingQuery.java:151)
at com.ninemax.animation.persistence.template.EbeanSupport.main(EbeanSupport.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
Caused by: javax.persistence.PersistenceException: java.sql.SQLException: Unsuccessfully waited for a connection to be returned. No connections are free. You need to Increase the max connections or look for a connection pool leak.
at com.avaje.ebean.server.transaction.TransactionManager.createTransaction(TransactionManager.java:356)
at com.avaje.ebean.server.core.DefaultServer.createTransaction(DefaultServer.java:635)
at com.avaje.ebean.server.core.DefaultServer.findFutureRowCount(DefaultServer.java:1246)
at com.avaje.ebean.server.query.LimitOffsetPagingQuery.getFutureRowCount(LimitOffsetPagingQuery.java:80)
at com.avaje.ebean.server.query.LimitOffsetPagingQuery.getTotalRowCount(LimitOffsetPagingQuery.java:149)
... 6 more
Caused by: java.sql.SQLException: Unsuccessfully waited for a connection to be returned. No connections are free. You need to Increase the max connections or look for a connection pool leak.
at com.avaje.ebean.server.lib.sql.DataSourcePool._getPooledConnection(DataSourcePool.java:818)
at com.avaje.ebean.server.lib.sql.DataSourcePool.getPooledConnection(DataSourcePool.java:757)
at com.avaje.ebean.server.lib.sql.DataSourcePool.getConnection(DataSourcePool.java:745)
at com.avaje.ebean.server.transaction.TransactionManager.createTransaction(TransactionManager.java:331)
... 10 more


Ebean.properties:
datasource.ora.username= animation
datasource.ora.password= animation
datasource.ora.databaseUrl=jdbc:oracle:thin:@127.0.0.1:1521:LOCALDB
datasource.ora.databaseDriver=oracle.jdbc.driver.OracleDriver
datasource.ora.minConnections=1
datasource.ora.maxConnections=10
#datasource.ora.heartbeatsql=select count(*) from dual
datasource.ora.isolationlevel=read_committed
#######################zhoupeng
datasource.ora.maxInactiveTimeSecs=-1
datasource.ora.leakTimeMinutes=-1
datasource.ora.waitTimeoutMillis=1000
#datasource.ora.captureStackTrace=true
#datasource.ora.autoCommit=true

Test Function

public static void main(String args []){

for(int i=0;i<15;i++){
PagingList list = Ebean.find(Order.class).findPagingList(10);
}
}

17 Mar 07:00
by Rob

I was unable to reproduce your problem.

Can you provide a test case? (see the bug).

> How to configure the JNDI of Tomcat?

Refer to ServerConfig.setDataSourceJndiName(...). Please do not log enhancement requests for questions.

Thanks, Rob.

Create a New Topic

Title:
Body:
 
Introduction User Guide (pdf) Install/Configure Public JavaDoc Whitepapers
General Database Specific Byte Code Deployment Annotations Features
Top Bugs Top Enhancements
woResponse