When I develop with Play, it always throw the following exception, can
anyone tell me how to resolve it?
@61ml13e2e
Internal Server Error (500) for request GET /edit/district?
city=sh&page=17
Oops: PersistenceException
An unexpected error occured caused by exception PersistenceException:
org.hibern
ate.exception.GenericJDBCException: Cannot open connection
play.exceptions.UnexpectedException: Unexpected Error
at play.Invoker$Invocation.onException(Invoker.java:142)
at play.Invoker$Invocation.run(Invoker.java:182)
at Invocation.HTTP Request(Play!)
Caused by: javax.persistence.PersistenceException:
org.hibernate.exception.Gener
icJDBCException: Cannot open connection
at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException
(AbstractEntityManagerImpl.java:614)
at
org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:41)
at play.db.jpa.JPAPlugin.startTx(JPAPlugin.java:227)
at play.db.jpa.JPAPlugin.beforeInvocation(JPAPlugin.java:190)
at play.Invoker$Invocation.before(Invoker.java:114)
at play.Invoker$Invocation.run(Invoker.java:175)
... 1 more
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open
connection
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException
(SQLStateConverter.java:126)
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:114)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:66)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:52)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
.java:449)
at
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.
java:167)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:
142)
at
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:
85)
at
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354
)
at
org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)
... 5 more
Caused by: java.sql.SQLException: An attempt by a client to checkout a
Connectio
n has timed out.
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:
106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:
65)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConne
ction(C3P0PooledConnectionPool.java:527)
at
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(A
bstractPoolBackedDataSource.java:128)
at
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.get
Connection(InjectedDataSourceConnectionProvider.java:46)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
.java:446)
... 10 more
Caused by: com.mchange.v2.resourcepool.TimeoutException: A client
timed out whil
e waiting to acquire a resource from
com.mchange.v2.resourcepool.BasicResourcePo
ol@df672a -- timeout at awaitAvailable()
at
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicRes
ourcePool.java:1317)
at
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(
BasicResourcePool.java:557)
at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicR
esourcePool.java:477)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConne
ction(C3P0PooledConnectionPool.java:525)
... 13 more
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
Actually, I tested the jdbc pool that, I refreshed one page quickly,
the jdbc connnection increased quickly. When I stopped refreshing, the
jdbc connnection is still alive.
2010/3/11 Brad Luo <luoti...@gmail.com>: