Hi, Yes, I'm afraid without more details it's not possible to analyze this problem. You could ask at the c3p0 mailing list why the underlying SQL exception is swallowed, and how to retrieve it.
Regards, Thomas On Tuesday, November 1, 2011, Noel Grandin wrote: > There should still be some kind of earlier exception, either a timeout > exception, or a failed-to-connect exception, or a > jdbc-returned-an-error-code exception. > But there is nothing here that mentions H2 at all. > > > Elton (GMAIL) wrote: > > Correct. That’s because I use the c3p0 connection pool which establishes > the > > connection to the database. C3P0 throws an exception if the database > > connection is not returned within the given time interval. So the issue > I'm > > trying to highlight here is the compatibility of the current version with > > c3p0 DB connection pool library. > > > > -----Original Message----- > > From: Noel Grandin [mailto:[email protected] <javascript:;>] > > Sent: Monday, October 31, 2011 11:48 PM > > To: Elton (GMAIL); [email protected] > > Subject: Re: Issue with c3p0 when using h2-1.3.161. > > > > Hmmm, interesting. > > Is there perhaps an error message earlier on in the log? > > I ask because I can't see a root cause belonging to H2 anywhere in that > > stacktrace. > > > > On Mon, Oct 31, 2011 at 18:42, Elton (GMAIL) <[email protected]> > wrote: > >> Hi Noel, > >> Thank you for replying. It is not an issue related to the DB > >> connection string. I must add here that using the previous x.x.160 > >> version works and only when I replace the jar with vx.x.161 do I run > into > > this problem. > >> Regards > >> Elton Kent > >> > >> -----Original Message----- > >> From: Noel Grandin [mailto:[email protected]] > >> Sent: Monday, October 31, 2011 5:51 PM > >> To: [email protected] > >> Cc: steve > >> Subject: Re: Issue with c3p0 when using h2-1.3.161. > >> > >> you probably haven't specified the database URL properly. > >> > >> see http://www.h2database.com/html/tutorial.html#connecting_using_jdbc > >> > >> steve wrote: > >>> Hello > >>> Firstly , thank you for this awesome database. I've upgraded to the > >>> current release and noticed that the application wasn't functioning > >>> as expected. Turns out a database connection could be established by > >>> hibernate. > >>> > >>> I've attached a stacktrace. > >>> > >>> > >>> java.sql.SQLException: Connections could not be acquired from the > >>> underlying database! > >>> at > >>> com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106) > >>> at > >>> > >> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnec > >> tion(C > >> 3P0PooledConnectionPool.java: > >>> 529) > >>> at > >>> > >> com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(Ab > >> stract > >> PoolBackedDataSource.java: > >>> 128) > >>> at > >>> > >> org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0Conn > >> ection > >> Provider.java: > >>> 78) > >>> at > >>> > >> org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper. > >> prepar > >> e(SuppliedConnectionProviderConnectionHelper.java: > >>> 51) > >>> at > >> org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java: > >>> 168) > >>> at > >>> org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java: > >>> 375) > >>> at > >>> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java: > >>> 1872) > >>> at > >>> > >> com.callidus.db.HibernateSessionFactory.<clinit>(HibernateSessionFacto > >> ry.jav > >> a: > >>> 68) > >>> at com.callidus.db.dao.BaseDAO.getSession(BaseDAO.java:12) > >>> at > >>> > >> com.callidus.db.dao.EmbeddedAppsDAO.getAllActiveApplications(EmbeddedA > >> ppsDAO > >> .java: > >>> 16) > >>> at > >>> > >> com.callidus.agents.local.WebServerSetupAgent.getAllHandlers(WebServer > >> SetupA > >> gent.java: > >>> 160) > >>> at > >>> > >> com.callidus.agents.local.WebServerSetupAgent.configureHttpServer(WebS > >> erverS > >> etupAgent.java: > >>> 39) > >>> 3P0PooledConnectionPool.java: > >>> 525) > >>> ... 16 more > >>> 106118 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL > >>> Error: 0, SQLState: null > >>> 106118 [main] ERROR org.hibernate.util.JDBCExceptionReporter - > >>> Connections could not be acquired from the underlying database! > >>> Exception in thread "main" > >>> org.hibernate.exception.GenericJDBCException: Cannot open connection > >>> at > >>> > >> org.hibernate.exception.SQLStateConverter.handledNonSpecificException( > >> SQLSta > >> teConverter.java: > >>> 140) > >>> at > >>> > org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java: > >>> 128) > >>> at > >>> > >> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelpe > >> r.java > >> : > >>> 66) > >>> at > >>> > >> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelpe > >> r.java > >> : > >>> 52) > >>> at > >>> > > > org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java: > >>> 449) > >>> at > >>> > > > org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java: > >>> 167) > >>> at > >>> > >> org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatch > >> er.jav > >> a: > >>> 161) > >>> at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java: > >>> 1700) > >>> at org.hibernate.loader.Loader.doQuery(Loader.java:801) > >>> at > >>> > >> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loa > >> der.ja > >> va: > >>> 274) > >>> at org.hibernate.loader.Loader.doList(Loader.java:2542) > >>> at > >> org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) > >>> at org.hibernate.loader.Loader.list(Loader.java:2271) > >>> at > >>> org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459) > >>> at > >>> > org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java: > >>> 365) > >>> at > >>> org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java: > >>> 196) > >>> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) > >>> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) > >>> at > >>> > >> com.callidus.db.dao.EmbeddedAppsDAO.getAllActiveApplications(EmbeddedA > >> ppsDAO > >> .java: > >>> 19) > >>> at > >>> > >> com.callidus.agents.local.WebServerSetupAgent.getAllHandlers(WebServer > >> SetupA > >> gent.java: > >>> 160) > >>> at > >>> > >> com.callidus.agents.local.WebServerSetupAgent.configureHttpServer(WebS > >> erverS > >> etupAgent.java: > >>> 39) > >>> at > >>> > >> com.callidus.agents.local.WebServerSetupAgent.execute(WebServerSetupAg > >> ent.ja > >> va: > >>> 63) > >>> at > >>> com.callidus.agents.CallidusAgent.call(CallidusAgent.java:27) > >>> at > >>> com.callidus.agents.CallidusAgent.runAgent(CallidusAgent.java:79) > >>> at com.callidus.server.Server.startUpServer(Server.java:143) > >>> at com.callidus.Callidus.main(Callidus.java:18) > >>> Caused by: java.sql.SQLException: Connections could not be acquired > >>> from the underlyin -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
