pacionet
pacionet

Reputation: 361

ORA-01000 - Maximum open cursors exceeded - Spring JDBC 3.2.5

we have a Java Enterprise Application running on Weblogic Server 12c using Spring JDBC 3.2.5 to access Oracle 11gR2 Database. In production environment after some time we got this exception: "ORA-01000 - Maximum open cursors exceeded" and server instance need to be restarted; it seems that open cursors increase more and more until they reach the maximum threshold set on Oracle. Increasing the threshold didn t solve the problem. We check the (very large) source code but we didn t find any point where we miss closing connection, at the moment; moreover we usually don t open and close connections but we use Spring JdbcTemplate to handle database interaction. Could be a Spring problem? Any hints?

Upvotes: 2

Views: 4057

Answers (2)

pacionet
pacionet

Reputation: 361

It was a bug of that version of Spring. update Spring Library

Upvotes: 0

Uwe Plonus
Uwe Plonus

Reputation: 9974

The oracle message "ORA-01000 - Maximum open cursors exceeded" can be caused by not closing PreparedStatements or ResultSets. Each PreparedStatement or ResultSet is a cursor in the Oracle database.

To circumvent this error for the short term you can increase the limit of open cursors in the database (but sooner or later it will occur again).

To circumvent this error really you have to audit the complete application and close all opened PreparedStatements or ResultSets.

Also an intermediate JDBC driver which tracks all PreparedStatements or ResultSets can help to identify the problematic part of the application.

Upvotes: 1

Related Questions