My Oracle Support Banner

"java.sql.SQLException: Cannot create connections. There are no available connections: oracle.ucp.NoAvailableConnectionsException" Occurs When ConnectionWaitTimeout is Set to Zero (Doc ID 2798991.1)

Last updated on AUGUST 16, 2021

Applies to:

Universal Connection Pool - Version 19.7 and later
Information in this document applies to any platform.


After upgrading JDBC/UCP drivers, the below exception is seen very often but not all the time:

2021-04-27 18:24:39,101 (CEST) CTX= ERROR <PKG.CLASS_NAME> An SQLException occurs for pool <POOL_NAME>:
java.sql.SQLException: Cannot create connections. There are no available connections: oracle.ucp.NoAvailableConnectionsException
   at oracle.ucp.util.UCPErrorHandler.newSQLException( ~[ucp-]
   at oracle.ucp.util.UCPErrorHandler.throwSQLException( ~[ucp-]
   at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection( ~[ucp-]
   at oracle.ucp.jdbc.PoolDataSourceImpl.access$300( ~[ucp-]
   at oracle.ucp.jdbc.PoolDataSourceImpl$ ~[ucp-]
   at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection( ~[ucp-]
   at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection( ~[ucp-]
   at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection( ~[ucp-]
Caused by: oracle.ucp.NoAvailableConnectionsException
   at ~[ucp-]
   at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection( ~[ucp-]
   ... 17 more


The connection pool is big (100 connections) and the exception occurs since the first call to get a connection from the pool.  The pool may still have lots of free connections at that time.

Note : UCP pool has been configured to disable connectionWaitTimeout (same configuration as with version

It was observed that when connectionWaitTimeout is set to default or 5, the error oracle.ucp.NoAvailableConnectionsException does not occur.
The objective is to not activate connectionWaitTimeout in production. So it has been disabled as suggested in:


Why does this exception occur when connectionWaitTimeout is disabled by setting it to Zero (0) ?


JDBC/UCP drivers were upgraded from to


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.