File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes java.sql.SQLException: 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: ORA-01000: maximum open cursors exceeded" Watch "java.sql.SQLException: ORA-01000: maximum open cursors exceeded" New topic
Author

java.sql.SQLException: ORA-01000: maximum open cursors exceeded

raj chopra
Ranch Hand

Joined: Apr 09, 2012
Posts: 60
Hi All,

I am using hibernate 3.0,spring 1.2,struts 1.2.

most of the code deals with hibernate and some orther parts with jdbc connections.

the places where jdbc connection was used, prepared statements,connection cons, and results sets were used and they were later not closed.

i believe this would be root cause to this error. so iam planning to close all three jdbc related in code using finally block.
on the orther end of the line , i am planning to increase my cursors size in oracle 9i db as well.

kindly guide me , appropriate steps to close these connection, or any orther way to close these cursors through in the code.

sample code :


thanks in advacne


Reagrds,
raj chopra
G krishna kumar
Greenhorn

Joined: Oct 10, 2012
Posts: 14
the problem is when you opening a connection, statement,resultset it is recomanded to close the connection and statement ans resultset.
it will work. fne
raj chopra
Ranch Hand

Joined: Apr 09, 2012
Posts: 60
Hi krishna,

thanks for reply

G krishna kumar wrote:the problem is when you opening a connection, statement,resultset it is recomanded to close the connection and statement ans resultset.
it will work. fne


i am closing the all the connections,resultsets etc as suggested. however this process needs to be done through out my project and without effecting any functional changes.
so iam looking for a way to identify such a part of code where more number of connections opened, or like more number of resultsets are used, more like to track the trouble part of code .
if i am able to track them i am planning to close them on top proirity. any ideas will be appreciated.

thanks in advace.
G krishna kumar
Greenhorn

Joined: Oct 10, 2012
Posts: 14
Hi chopra,

please go through the following url. http://www.ypl.com/oracle/manuals/pl_sql_user_guide/articles/max_open_cursors_exceeded_bea.htm
http://www.zugiart.com/2010/08/handling-oracle-cursors-in-jdbc/ : refer the summary

my suggestion is that identify your java applications where you are performing the database operation to obtain the connections.
then try to close all the connection in all appropriate java application.

i hope that it will give you some idea.

http://www.coderanch.com/t/300088/JDBC/databases/ORA-maximum-open-cursors-exceeded

Regards
Kumar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: ORA-01000: maximum open cursors exceeded
 
Similar Threads
matching rows from one table to another
SQL Problem self joining
Why do we need to close the ResultSet?
unable to update CLOB data using Commons DBCP connection.
java.sql.SQLException: ORA-01006: bind variable does not exist