org.hibernate.exception.GenericJDBCException: Could not open connection


Solutions on the web

Solution icon of github
via GitHub by DJuego
, 8 months ago
Could not open connection

Stack trace

org.hibernate.exception.GenericJDBCException: Could not open connection
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:221)[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:157)[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1432)[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at de.fhg.iais.roberta.persistence.util.DbSession.<init>(DbSession.java:32)[OpenRobertaServer.jar:na]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at de.fhg.iais.roberta.persistence.util.SessionFactoryWrapper.getSession(SessionFactoryWrapper.java:56)[OpenRobertaServer.jar:na]
	at java.lang.Thread.run(Thread.java:745)
	at de.fhg.iais.roberta.main.ServerStarter.checkRobotPluginsDB(ServerStarter.java:304)[OpenRobertaServer.jar:na]
Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection
	at de.fhg.iais.roberta.main.ServerStarter.main(ServerStarter.java:85)[OpenRobertaServer.jar:na]
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)

Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)[mchange-commons-java-0.2.3.4.jar:na]
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:689)[c3p0-0.9.2.1.jar:0.9.2.1]
	at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:221)
	at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)[c3p0-0.9.2.1.jar:0.9.2.1]
	at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:157)
	at org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:84)[hibernate-c3p0-4.2.7.Final.jar:4.2.7.Final]
	at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
	at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:292)[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
	at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
	at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:214)[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
	at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1432)
	... 2 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.