Hibernate version:3.0.2
Hello,
I get an OutOfMemoryException in the following block:
Session session = sessionFactory.openSession();
List models = (List) session.createCriteria(MyModel.class).list();
session.close();
sessionFactory.evict(MyModel.class);
At first sight the problem seems very obvious, but matters are behind the scenes more complicated:
Firstly, the query above (only executed for testing purposes) only return some 1500 records which should not cause memory to run full.
Secondly, the problem exists only when connected with the test database but not when connected with the dev database. Both databases are identical (created with the same SQL create table statements). After I regenerate the test database (drop table, then create table) the problem disappears. After a while it pops up to the surface again. We use MS SQL Server 2000 with Microsoft's latest sqljdbc.jar.
Does somebody have an idea where to start searching for the cause of the problem? We haven't gone into production and I would like to have tracked this down before we do so.
Thanks and regards,
Oliver
|