An unexpected error occured caused by exception PersistenceException:
org.hibernate.exception.GenericJDBCException: Cannot open connection
But later on when the DB is up, I still get this exception but caused
by :
An SQLException was provoked by the following failure:
com.mchange.v2.resourcepool.ResourcePoolException: Attempted to use a
closed or broken resource pool
So I have to restart my application to make it run again.
Any suggestion on how to solve this dynamically?
Regards,
Philippe
> --
> 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.
>
>
Here is the complete stack of the Exception happening after the DB is
restarted :
------------------------------------------------------------------------------------------------------
@61p8f726i
Internal Server Error (500) for request GET /interfaces
Oops: PersistenceException
An unexpected error occured caused by exception PersistenceException:
org.hibernate.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.GenericJDBCException: 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.java:
114)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:
66)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.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 SQLException was provoked by the
following failure: com.mchange.v2.resourcepool.ResourcePoolException:
Attempted to use a closed or broken resource pool
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:
531)
at
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:
128)
at
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:
46)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:
446)
... 10 more
Caused by: com.mchange.v2.resourcepool.ResourcePoolException:
Attempted to use a closed or broken resource pool
at
com.mchange.v2.resourcepool.BasicResourcePool.ensureNotBroken(BasicResourcePool.java:
1632)
at
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:
524)
at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:
477)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:
525)
... 13 more
On 16 mar, 17:44, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> Can you check in the play.db.DBPlugin class, if there is an option
> that could solve your problem. Perhaps the configuration is bad.
>
> On Tue, Mar 16, 2010 at 1:44 PM, Philippe Gauthier
>