This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ORA-01000: maximum open cursors exceeded

 
Patrick Girard
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Jamie
 
Srikanth Y
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Srikanth
 
A Agrawal
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic