First, let me apologize for creating another thread. I just want a fresh start at this again.
We want to migrate from hibernate 2.7 to hibernate 3.02. The following is what we have:
- Hibernate 3.02
- Eclipse 3.1M4
- JBossIDE-1.5M1-hibernate-tools
- MySQL 4.1.7-nt
- Database contains 181 tables
Step 1: Allow the tool to create the hibernate.cfg.xml file. Output is the following:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.username">***</property>
<property name="hibernate.connection.password">****</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/atdb</property>
<property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
</session-factory>
</hibernate-configuration>
Step 2: Create console configuration. Configuration file points to hibernate.cfg.xml. There are no files under Mapping files. Classpath only includes driver for MySQL and it points to bin directory.
Step 3: Set artifact generation. First we selected the cosole configuration which was created in step 2. Output directory points to the src folder.
We want to first only generate the hbm.xml files so we check "Reverse engineer from JDBC Connection" and in the package we put our package name. We also check "generate mappings (hbm.xml)".
The reason we want to first create the hbm files is because there are some Sets where we would like to set lazy="false" so once we update all the hbm files that we need, than we were hoping to edit the console configuration and now point to hbm files. Finally use the artifact generation to "generate domain code (.java)".
Problem: When we try to generate the hbm.xml files it takes a very very long time. Eclipse after 30 to 45 minutes quits and gives a "out of memory error". In the previous thread Max mentioned it should only take a few seconds, could please tell us what was done incorrectly or do we have some versioning issues.