We are calling a variety of Stored procedures from a servlet running on WebLogic. We are periodically receiving Max cursor open errors during our testing, even though we are the only client accessing the server. We have placed all of the relevant close calls (ResultSets, Statements and Connnections) in finally clauses for the relevant methods and we are sure they are being closed. We have looked in our WLS connection pool and there are no open connections after our close calls have been made. However, if we interrogate the database for open cursors, we see all of our calls still active. Does anyone have any suggestions regarding next steps. Thanks in advance!!!
1. Search for all statements and resultsets and make sure they all get closed! After you have made sure that #1 isn't the culprit, Oracle has some internal problems with prepared statements. On some occasions, even though you close the resultset and prepared statements, the cursors remain open. Soon you will get "Ora-1000 max number of cursors exceeded" or something to that effect. There are 3 workarounds: 2. set max number of open cursors in Oracle to a high number (at least 200... the default is 40ish) as this does not effect performance of the DB. 3. force a rollback: connection.rollback() 4. close the connection: connection.close() hope this helps NOTE: try updating your jdbc drivers to the latest ( and most bug free ) drivers possible. Jamie [ July 30, 2002: Message edited by: Jamie Robertson ]