From: Seib Jürgen <Juergen.S<eib@dw...> - 2012-02-24 14:50:18
I encountered a problem with the current development trunk of GeoNetwork during a batch import of metadata records. Less than 60 records were imported. Then, the import of the rest fails due an "ORA-0100: Maximum open cursors exceeded" error of the database. The value for the maximum of open cursors was set to 300.
After exploring the problem I found out that the reason for this are non-parameterized SQL statements. Most SQL statements in the program code are parameterized, i.e. instead of writing a program snippet like
String query = "DELETE FROM metadata WHERE id=" + id;
the code snippet
String query = "DELETE FROM metadata WHERE id=?";
is used. However, there still exists "bad" program code which results in the use of a new cursor for each instance of the SQL statement. The problem can be fixed by the exchange of all "badly" implemented SQL statements by parameterized SQL statements.
Dr. Jürgen Seib
TI1/K - IT-Koordination
Frankfurter Strasse 135