Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,

    Check if your MongoDB is available.

  2. ,

    Check if your MariaDB is running and available.

Solutions on the web

via GitHub by jackrabb1t
, 1 year ago
org.hibernate.exception.GenericJDBCException: Could not open connection
via Google Groups by Unknown author, 1 year ago
org.hibernate.exception.GenericJDBCException: Could not open connection
via jboss.org by Unknown author, 2 years ago
org.hibernate.exception.GenericJDBCException: Could not open connection
via Hibernate JIRA by Martin Striz, 1 year ago
org.hibernate.exception.GenericJDBCException: could not execute query
via Hibernate JIRA by Martin Striz, 2 years ago
org.hibernate.exception.GenericJDBCException: could not execute query
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)[hibernate-entitymanager-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)[hibernate-entitymanager-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:273)[hibernate-entitymanager-4.2.0.Final.jar:4.2.0.Final] at org.jbpm.services.task.persistence.JPATaskPersistenceContext.queryInTransaction(JPATaskPersistenceContext.java:421)[jbpm-human-task-jpa-6.4.0.Beta1.jar:6.4.0.Beta1] at org.jbpm.services.task.commands.InitDeadlinesCommand.execute(InitDeadlinesCommand.java:52)[jbpm-human-task-core-6.4.0.Beta1.jar:6.4.0.Beta1] at org.jbpm.services.task.commands.InitDeadlinesCommand.execute(InitDeadlinesCommand.java:33)[jbpm-human-task-core-6.4.0.Beta1.jar:6.4.0.Beta1] at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65)[jbpm-human-task-core-6.4.0.Beta1.jar:6.4.0.Beta1] at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)[drools-core-6.4.0.Beta1.jar:6.4.0.Beta1] at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:69)[jbpm-human-task-jpa-6.4.0.Beta1.jar:6.4.0.Beta1] at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)[drools-core-6.4.0.Beta1.jar:6.4.0.Beta1] at org.drools.persistence.jta.TransactionLockInterceptor.execute(TransactionLockInterceptor.java:73)[drools-persistence-jpa-6.4.0.Beta1.jar:6.4.0.Beta1] at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)[drools-core-6.4.0.Beta1.jar:6.4.0.Beta1] at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:82)[drools-persistence-jpa-6.4.0.Beta1.jar:6.4.0.Beta1] at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40)[jbpm-human-task-core-6.4.0.Beta1.jar:6.4.0.Beta1] at org.jbpm.services.task.impl.TaskDeadlinesServiceImpl.initialize(TaskDeadlinesServiceImpl.java:367)[jbpm-human-task-core-6.4.0.Beta1.jar:6.4.0.Beta1] at org.jbpm.services.task.HumanTaskConfigurator.getTaskService(HumanTaskConfigurator.java:157)[jbpm-human-task-core-6.4.0.Beta1.jar:6.4.0.Beta1] at org.jbpm.vertx.VerticleServiceProvider.configureServices(VerticleServiceProvider.java:161)[__vertx~e90ebbed-eb74-4894-b19a-1d48034ff951~__vertx/:na] at org.jbpm.vertx.VerticleServiceProvider.<init>(VerticleServiceProvider.java:72)[__vertx~e90ebbed-eb74-4894-b19a-1d48034ff951~__vertx/:na] at org.jbpm.vertx.VerticleServiceProvider.configure(VerticleServiceProvider.java:46)[__vertx~e90ebbed-eb74-4894-b19a-1d48034ff951~__vertx/:na] at org.jbpm.vertx.JbpmVerticle.start(JbpmVerticle.java:48)[__vertx~e90ebbed-eb74-4894-b19a-1d48034ff951~__vertx/:na] at org.vertx.java.platform.Verticle.start(Verticle.java:82)[vertx-platform-2.1.5.jar:na] at org.vertx.java.platform.impl.DefaultPlatformManager$21.run(DefaultPlatformManager.java:1758)[vertx-platform-2.1.5.jar:na] at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:175)[vertx-core-2.1.5.jar:na] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:370)[netty-all-4.0.21.Final.jar:4.0.21.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)[netty-all-4.0.21.Final.jar:4.0.21.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)[netty-all-4.0.21.Final.jar:4.0.21.Final] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_45]Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:221)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:157)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.connection(StatementPreparerImpl.java:56)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:161)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:182)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:159)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1854)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1831)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1811)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.loader.Loader.doQuery(Loader.java:899)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.loader.Loader.doList(Loader.java:2516)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.loader.Loader.doList(Loader.java:2502)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2332)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.loader.Loader.list(Loader.java:2327)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:490)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:355)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:195)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1268)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:264)[hibernate-entitymanager-4.2.0.Final.jar:4.2.0.Final] ... 24 moreCaused by: java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource jdbc/jbpm with 0 connection(s) (0 still available) -failed- at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:262)[btm-2.1.4.jar:2.1.4] at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:292)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:214)[hibernate-core-4.2.0.Final.jar:4.2.0.Final] ... 44 moreCaused by: bitronix.tm.internal.BitronixRuntimeException: incremental recovery failed when trying to acquire a connection from failed resource 'jdbc/jbpm' at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:103)[btm-2.1.4.jar:2.1.4] at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:91)[btm-2.1.4.jar:2.1.4] at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:258)[btm-2.1.4.jar:2.1.4] ... 47 moreCaused by: bitronix.tm.recovery.RecoveryException: cannot start recovery on a PoolingDataSource containing an XAPool of resource jdbc/jbpm with 0 connection(s) (0 still available) at bitronix.tm.resource.jdbc.PoolingDataSource.startRecovery(PoolingDataSource.java:288)[btm-2.1.4.jar:2.1.4] at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:61)[btm-2.1.4.jar:2.1.4] at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:100)[btm-2.1.4.jar:2.1.4] ... 49 moreCaused by: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:207)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.Driver.makeConnection(Driver.java:393)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.Driver.connect(Driver.java:267)[postgresql-9.2-1003-jdbc4.jar:na] at java.sql.DriverManager.getConnection(DriverManager.java:664)[na:1.8.0_45] at java.sql.DriverManager.getConnection(DriverManager.java:247)[na:1.8.0_45] at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:97)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.xa.jdbc3.AbstractJdbc3XADataSource.getXAConnection(AbstractJdbc3XADataSource.java:54)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.xa.jdbc3.AbstractJdbc3XADataSource.getXAConnection(AbstractJdbc3XADataSource.java:39)[postgresql-9.2-1003-jdbc4.jar:na] at bitronix.tm.resource.jdbc.PoolingDataSource.createPooledConnection(PoolingDataSource.java:341)[btm-2.1.4.jar:2.1.4] at bitronix.tm.resource.common.XAPool.createPooledObject(XAPool.java:283)[btm-2.1.4.jar:2.1.4] at bitronix.tm.resource.common.XAPool.grow(XAPool.java:391)[btm-2.1.4.jar:2.1.4] at bitronix.tm.resource.common.XAPool.getInPool(XAPool.java:371)[btm-2.1.4.jar:2.1.4] at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:123)[btm-2.1.4.jar:2.1.4] at bitronix.tm.resource.jdbc.PoolingDataSource.startRecovery(PoolingDataSource.java:284)[btm-2.1.4.jar:2.1.4] ... 51 moreCaused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method)[na:1.8.0_45] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)[na:1.8.0_45] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)[na:1.8.0_45] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)[na:1.8.0_45] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[na:1.8.0_45] at java.net.Socket.connect(Socket.java:589)[na:1.8.0_45] at java.net.Socket.connect(Socket.java:538)[na:1.8.0_45] at org.postgresql.core.PGStream.<init>(PGStream.java:60)[postgresql-9.2-1003-jdbc4.jar:na] at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:101)[postgresql-9.2-1003-jdbc4.jar:na] ... 70 more