I am writing program to transfer data from csv to hsqldb database
I am using spring 3 and hibernate 3.
When i use the little csv data both 32bit and 64bit never so the error.
But when I run my program using 32bit windows seven, i got a message like this
113206 [AWT-EventQueue-0] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: -460, SQLState: S1000
113206 [AWT-EventQueue-0] ERROR org.hibernate.util.JDBCExceptionReporter - java.lang.OutOfMemoryError: Java heap space
but if I run my prrogram using 64bit windows seven, i never see the error..
so this is my question
- how i can optimize my entity model relation, so i will never show the message java.lang.OutOfMemoryError: Java heap space
- Give me the solution please!..
There's much too little information to say what causes this. The fact that the problem surfaces during a DB operation does not mean that DB operations in general take up a lot of memory - it simply indicates that this operation allocated the last remaining free bytes of memory. So focusing on the DB-related parts is premature - there could be a memory leak elsewhere.
How big is the heap space allocated to the JVM? Is it different from what was allocated on a 64-bit system? Have you tried allocating more? Spring and Hibernate are both sizeable frameworks, it would not be unreasonable to have to give them more than the default allocation. How big is the CSV file?