• 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

 
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay. I know this error happens when we don't close the connections / statements / resultsets properly. But, is there a way to find out which connection / statement / resultset is left open? This is a huge application and it is next to impossible to do a code review and find out where the mistake lies.
Is it possible somehow to know which connection / statement / resultset is creating the problem? (either by monitoring at the Oracle end or using some logging in Java front?)

Thanks in advance.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Okay. I know this error happens when we don't close the connections / statements / resultsets properly


It also happens when you haven't allocate enough cursors in Oracle to support your app in the first place. I'd check that too.

You are able to get the session ID which is holding the cursor open through Oracle I think - you'd have to look this up in the docs though, because I can't remeber offhand how its done.

This might be a little after the fact I know, but a good DAO framework would help prevent this sort of error.
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
The cursor size is set to 1000 in Oracle -more than enough for this application.
And, it is currently not possible to make any big changes to this application. So the DAO approach is ruled out, at least for now.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It will be quite tedious. I fear you can't do much more than test each part of the code and check the Oracle logs for opening and closing of connections while you're doing it.

Might be easier to get a bunch of students through a work agency for a few days to munch over the code line by line.
[ May 25, 2004: Message edited by: Bear Bibeault ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic