Two Laptop Bag
The moose likes JDBC and Relational Databases and the fly likes ORA-01000: maximum open cursors exceeded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "ORA-01000: maximum open cursors exceeded" Watch "ORA-01000: maximum open cursors exceeded" New topic

ORA-01000: maximum open cursors exceeded

Patrick Girard

Joined: May 28, 2001
Posts: 5
I wrote a class to do some JDBC actions like selects , and inserts...and connection to database ...all the stuff required is done by function calls to this class....i know have an error with MAXIMU CURSORS EXCEEDED ...but i close my ResultSets every time I open them....I dont understand the error maybe?
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

do you also close your Statements. It is more important to close your Statements/PreparedStatements as this is what causes the increase in Oracle cursors being open. let me know if this helps. If it does not help, are you using a connection pool?
Srikanth Y

Joined: Jul 18, 2001
Posts: 1
Make sure that you're getting an Oracle connection only once per session. This error occurs when multiple Oracle JDBC connections are opened in a session.

A Agrawal
Ranch Hand

Joined: Jul 13, 2001
Posts: 41
If you are using connection pool, close statements properly as it than automatically closes resultsets.
If you are not using any connection pool, close connection properly as it than closes all associated statements and resultsets.

and do the closing work in finally{} block to make sure that statement/connection gets closed irrespective your code faces any exception.

Also You may need to set no of processes at Oracle End if you have set it too less for your Application.

Amit Agrawal,
New Delhi, India.

Amit Agrawal,<BR>New Delhi, India.
I agree. Here's the link:
subject: ORA-01000: maximum open cursors exceeded
jQuery in Action, 3rd edition