My Oracle Support Banner

ORA-12631 when trying to Connect using Kerberos Authentication from Concurrent Clients using Forwardable Credentials (Doc ID 2691786.1)

Last updated on AUGUST 09, 2023

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


Oracle JDBC connections to the database using Kerberos5 authentication intermittently fail with the following exception:

java.sql.SQLException: Oracle Error ORA-12631
at oracle.jdbc.driver.T4CConnection.logon(
at oracle.jdbc.driver.PhysicalConnection.connect(
at oracle.jdbc.driver.T4CDriverExtension.getConnection(
at oracle.jdbc.driver.OracleDriver.connect(
at oracle.jdbc.driver.OracleDriver.connect(
at java.sql/java.sql.DriverManager.getConnection(Unknown Source)
at java.sql/java.sql.DriverManager.getConnection(Unknown Source)
at java.base/java.util.concurrent.Executors$ Source)
at java.base/ Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
at java.base/ Source)
Caused by: Oracle Error ORA-12631
at Source)
at oracle.jdbc.driver.T4C8TTIpro.receive(
at oracle.jdbc.driver.T4CConnection.connect(
at oracle.jdbc.driver.T4CConnection.logon(
... 12 more

Output in Database alert log:

A test application establishes 25 connections, with the configured delay between each connection request.
Every connection is used to fire a query at regular interval of 10 seconds and continues to do so for 1 minute. Post this, the test for this connection is marked as successful.

When tested with a delay of 5 seconds and 10 seconds - all connections were successful.
And, for a delay of 2 seconds, multiple attempts were made out of which one attempt reported the exception.

Additional details
- SQL*Plus connectivity works fine.
sqlplus /@ is the command used to connect to oracle after 'okinit ' is initiated.

- JDBC URL: jdbc:oracle:thin:@//<host>:<port>/<service>

- tnsnames.ora:
(ADDRESS = (PROTOCOL = TCP)(HOST = <host>)(PORT = <port>))
(SERVICE_NAME = <service>)

Oracle JDBC 18.3 (ojdbc8.jar)
Java 8
Oracle database


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.