Xiang (1) [Avatar] Offline
I follow the sample of Listing 5.22: use ScrollableResults to fetch the data, and index them in to local file system. OutOfMemoryException happens at the statement as

ScrollableResults results = session.createCriteria( Item.class )
.scroll( ScrollMode.FORWARD_ONLY );

it failed. And I change it to

list = session.createCriteria(CLASS).setFirstResult(BEGIN).

This fails too. The database is MySql, there are 1.7M records in the table.

Any idea about how to solve it? Thanks a lot!
s.grinovero (26) [Avatar] Offline
Re: OutOfMemoryException happens
Hello, we are having a thread on forums.hibernate.org (in the Search area) wich is probably related. Could you please join there?
And please show the stacktrace and version numbers, also for hibernate core.