Dear developers,
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;
dbms.execute(query);
the code snippet
String query = "DELETE FROM metadata WHERE id=?";
dbms.execute(query, Integer.parseInt(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.
Kind regards,
Jürgen
-----------------------------------
Dr. Jürgen Seib
Deutscher Wetterdienst
TI1/K - IT-Koordination
Frankfurter Strasse 135
63067 Offenbach
Tel.: +49(69)8062-2609
EMail: juergen.seib@anonymised.com