Hello
I have to load,
process and save arround 100,000 rows.
In order to do
this I set a batch size to 1000 (can increase or decrease this value) so I
process, for example 100 times x 1000 records.
So, in one
operation I have to save, let say, 1000 records. In order to do this I use
batches with IBatis.
I get
the "java.sql.BatchUpdateException: ORA-01000: maximum open cursors
exceeded" exception when I try to save.
My code is
something like this
...................
SqlMapClient sqlMap =
MyAppSqlConfig_Output.getSqlMapInstance();
try
{
sqlMap.startTransaction();
sqlMap.startBatch();
sqlMap.startTransaction();
sqlMap.startBatch();
....................
//
this is generated from a loop
{
sqlMap.insert("insert1", hm1); //hm1 is a HashMap
sqlMap.insert("insert2", hm2);
sqlMap.insert("insert3", hm3);
.....................
sqlMap.insert("insert1000",
hm1000);
}
int fromExecutebatch =
sqlMap.executeBatch();
sqlMap.commitTransaction();
sqlMap.commitTransaction();
}
catch (Exception e)
{
e.printStackTrace(System.out);
log.error(e);
}
finally
{
sqlMap.endTransaction();
........................
}
catch (Exception e)
{
e.printStackTrace(System.out);
log.error(e);
}
finally
{
sqlMap.endTransaction();
........................
}
Pls.
help!
Thanks,
Vio
