Solutions
Archived

ORA-12516 or ORA-12520, TNS:listener could not find available handler error when performing reconciliation in OpenIDM 3.x

Last updated Jan 5, 2021

The purpose of this article is to provide assistance if you receive the ORA-12516 or ORA-12520, TNS:listener could not find available handler error when performing reconciliation in OpenIDM 3.x. This error only occurs if you are using an Oracle® database with OpenIDM.


Archived

This article has been archived and is no longer maintained by ForgeRock.

Symptoms

One of the following errors is shown in the OpenIDM log when performing reconciliation:

ORA-12516

Apr 11, 2015 11:40:36 AM org.forgerock.openidm.sync.impl.ObjectMapping createTargetObject WARNING: Failed to create target object org.forgerock.openidm.objset.InternalServerErrorException: Creating object failed (12516-66000)Listener refused the connection with the following error: ORA-12516, TNS:listener could not find available handler with matching protocol stack ... Caused by: java.sql.SQLException: Listener refused the connection with the following error: ORA-12516, TNS:listener could not find available handler with matching protocol stack at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:185) at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.getConnection(JDBCRepoService.java:560) at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.create(JDBCRepoService.java:226) ... 41 more Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error: ORA-12516, TNS:listener could not find available handler with matching protocol stack at oracle.net.ns.NSProtocol.connect(NSProtocol.java:395) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320) ... 49 more

ORA-12520

Apr 15, 2015 10:26:20 AM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 filterGenericError WARNING: Resource exception: 500 Internal Server Error: "Querying failed: Listener refused the connection with the following error: ORA-12520, TNS:listener could not find available handler for requested type of server " org.forgerock.json.resource.InternalServerErrorException: Querying failed: Listener refused the connection with the following error: ORA-12520, TNS:listener could not find available handler for requested type of server ... Caused by: org.forgerock.script.exception.ScriptThrownException: Wrapped org.forgerock.json.resource.InternalServerErrorException: Querying failed: Listener refused the connection with the following error: ORA-12520, TNS:listener could not find available handler for requested type of server (/opt/forgerock/openidm/bin/defaults/script/policyFilter.js#42) in /opt/forgerock/openidm/bin/defaults/script/policyFilter.js at line number 42 at column number 0 {code=500, reason=Internal Server Error, message=Querying failed: Listener refused the connection with the following error: ORA-12520, TNS:listener could not find available handler for requested type of server , detail={fileName=/opt/forgerock/openidm/bin/defaults/script/policy.js, lineNumber=233, columnNumber=0}} at org.forgerock.script.javascript.RhinoScript.eval(RhinoScript.java:318) at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.forgerock.script.registry.ScriptRegistryImpl$LibraryRecord.invoke(ScriptRegistryImpl.java:508) at com.sun.proxy.$Proxy11.eval(Unknown Source) at org.forgerock.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:720) at org.forgerock.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:731) at org.forgerock.openidm.core.filter.ScriptedFilter.evaluateOnRequest(ScriptedFilter.java:319) ... 33 more

Recent Changes

Upgraded to OpenIDM 3.1 and used the sample Oracle repo.jdbc.json file.

Disabled the connection pool in OpenIDM. 

Causes

The connection pool is not enabled in OpenIDM; this can cause the Oracle database to believe a connection limit has been reached.

Connection pooling is incorrectly not enabled by default in the sample Oracle repo.jdbc.json file in OpenIDM 3.1.

Solution

Update the repo.jdbc.json file (located in the /path/to/openidm/conf directory) by adding the following to the connection section:

"enableConnectionPool" : true,​

Restart OpenIDM to apply this change.

See Also

How do I configure the connection pool for the managed repository in OpenIDM 4.x?

Related Training

N/A

Related Issue Tracker IDs

OPENIDM-2877 (Oracle sample repo.jdbc.json disables connection pooling by default)


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.