Slow Connections and Intermittent ORA-12521 From WebLogic Application Using Oracle JDBC to Connection to a RAC Database (Doc ID 1999778.1)

Last updated on OCTOBER 25, 2016

Applies to:

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

Symptoms

Oracle WebLogic 12.1.2 application is slow to connect to a 2-node RAC database, usually taking around 1 minute.
At the time of the issue,
the application reports intermittent ORA-12521 errors:

####<Apr 11, 2015 1:24:34 PM EDT> <Info> <JDBC> <l1217702001> <app-01> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-22DC247CB7E11102F251> <> <1428773074520> <BEA-001156> <Stack trace associated with message 001129 follows:

java.sql.SQLException: Listener refused the connection with the following error:

ORA-12521, TNS:listener does not currently know of instance requested in connect descriptor
               at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:465)
               at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
               at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:232)
               at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
               at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
               at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
               at oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:469)
               at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:156)
               at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:101)
               at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection0(XAConnectionEnvFactory.java:540)
               at weblogic.jdbc.common.internal.XAConnectionEnvFactory.access$000(XAConnectionEnvFactory.java:31)
               at weblogic.jdbc.common.internal.XAConnectionEnvFactory$1.run(XAConnectionEnvFactory.java:495)
...

Caused By: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12521, TNS:listener does not currently know of instance requested in connect descriptor
               at oracle.net.ns.NSProtocol.connect(NSProtocol.java:395)
               at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1109)
               at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:316)
               at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
               at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:232)
               at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
               at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
               at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
               at oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:469)
               at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:156)
               at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:101)
               at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection0(XAConnectionEnvFactory.java:540)
               at weblogic.jdbc.common.internal.XAConnectionEnvFactory.access$000(XAConnectionEnvFactory.java:31)
               at weblogic.jdbc.common.internal.XAConnectionEnvFactory$1.run(XAConnectionEnvFactory.java:495)

 

In the listener log, many entries such as the following are seen:

11-APR-2015 11:36:17 * <unknown connect data> * 12569

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms