• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ORA-01000: maximum open cursors exceeded

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic