Hi,
First, sorry for my (bad) english
I have the next scenario:
1.- Extract DB schema with middlegen 2.1 (hibernate plugin): About 390 hbm.xml files).
2.-Gen java classes with Hbm2JavaTask (Hibernate 3.0.5 production version)
3.- Gen hibernate.cfg.xml with HibernateConfigFileTask
4.- Replace all "hibernate-mapping-2.0.dtd" with "hibernate-mapping-3.0.dtd" in all hbm.xml files and setting property default-lazy with false.
Then run a simple program test like this:
...
Configuration c = new Configuration(); //0 seconds
c.configure(); //13 seconds
SessionFactory sFactory = c.buildSessionFactory();
Session session = sFactory.openSession();
session.close();
...
During buildSessionFactory appears this exception: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
(My xms settings is -Xmx256m -Xms128m)
(I use cglib-2.1_2.jar)
Using a profiler I can see more than 1.700.000 instances of class[] in memory, I think garbage collector can't evict it. I have read in previous topics of this forum (and in cglib's forums and in others... ) but the answers doesn't help me. I changed property hibernate.cglib.use_reflection_optimizer to false and the result is the same.
What can I do?
My db is Oracle9.2i
There s no code betwen open and close session.
Exception hasn't stack trace.
No sql generated.
Debug level=warn
Thanks
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: