Results 1 to 5 of 5
- 12-14-2010, 09:49 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 11
- Rep Power
- 0
ORA-01000 maximum open cursors exceeded
Hi,
I am getting the following java sql exception error on jsp page :
java.sql.SQLException: ORA-01000: maximum open cursors exceeded
This page connects with database and performs a query whose resultset is displayed on the page.The page get's refreshed every 55 secs or so.After a particular time period I get this error.
On searching the net I found that when the number of open cursors exceed such an error and the solution lies in properly closing these opened cursors.
So I tried to close the resultset after execution of the statement (ResultSet.close() ) but the problem still persists after a particular time usually 15 minutes or so I get this error.
Advice would be appreciated.
Thanks & Regards,
Rajeev Nair.
- 12-14-2010, 10:00 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Are you sure that the result sets closed is mapped with the retrieval/open process?
- 12-14-2010, 10:21 AM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,479
- Rep Power
- 16
You'll have to show us the code that opens and closes the result set, and any statements as well. You're clearly not closing them correctly.
- 12-14-2010, 12:44 PM #4
Member
- Join Date
- Nov 2010
- Posts
- 11
- Rep Power
- 0
re: code
Hi,
I am posting a part of the coding
[code ]
<BODY onload="doTimer()" >
<table align="left" valign="top">
<tr>
<td width="10%" class='tdCSS' align="right" valign="top">
<div class="sc_menu">
<%
GetData d = new GetData();
ResultSet result =null;
result = d.rs("Select distinct SR_N0 from tech_mail order by SR_N0");
try {
while(result.next()){
String sr = "SR#";
sr = sr + result.getString(1);
%>
<a title=<%=sr%> href="#" onmouseover="stopTimer()" onmouseout="check()" onclick="clicked('<%=sr%>')" ><img src="images/images1.jpg" name ='<%=sr%>' id ='<%=sr%>' width="60" height="60" alt=<%=sr%>/><%=sr%></a>
<%
}
}
result.close();
}
%>
</div>
</td>
[/code]
GetData( ) class - >contains rs() method which returns the queried resultset
Regards,
RajeevLast edited by jeev81; 12-14-2010 at 01:31 PM.
- 12-14-2010, 01:10 PM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,479
- Rep Power
- 16
code tags use square [] brackets.
You also shouldn't do this sort of thing in a JSP, since it makes it harder to keep track of things. JSPs are for display. A Servlet should be getting the data and then passing it onto the JSP.
I can't quite see the flow, but when you get the code tags fixed that might help. What does GetData() do? What does it look like? What does the rs() method do and look like?
Are you leaving your statements open?
Similar Threads
-
GC Overhead limit exceeded error when reading a text file
By collegian in forum New To JavaReplies: 0Last Post: 10-20-2010, 03:47 PM -
Java Cursors
By 67726e in forum Advanced JavaReplies: 20Last Post: 09-29-2010, 04:09 AM -
Minimization, Maximum Likelihood open source package
By Iskatel in forum New To JavaReplies: 7Last Post: 04-01-2010, 10:55 AM -
Open Cursors exceeed...question for fellow gurus
By AlmostAGuru in forum Advanced JavaReplies: 2Last Post: 08-11-2009, 01:37 AM -
Exception: max stack exceeded
By ourip in forum Threads and SynchronizationReplies: 4Last Post: 05-27-2008, 10:05 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks