Cursor Leak Leading to ORA-1000 With JDBC Thin Driver 12.1.0.2

(Doc ID 2188724.1)

Last updated on SEPTEMBER 30, 2016

Applies to:

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

Symptoms

On : 12.1.0.2.0 version, Thin JDBC driver

Cursor leak with JDBC thin driver 12.1.0.2 .
Using a simple procedure with the new implicit cursors call, a cursor leak is seen with the JDBC Thin driver. This leads to ORA-1000 after some hundred calls to the procedure.
If connected with JDBC OCI, the number of open cursors does not increase.

Below the test case:

 

ERROR
-----------------------
ORA-01000: Maximum open cursors exceeded


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Create the following procedure:
create or replace PROCEDURE test1
AS
  v_cursor sys_refcursor;
BEGIN
  OPEN v_cursor FOR
  select 1 from DUAL;
 
  DBMS_SQL.RETURN_RESULT(v_cursor) ;
 
END;
2. Invoke it a hundred times from JDBC thin program.



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