Hi all,
I have just started learning Hibernate so as to evaluate it as a potential replacement to Struts 2 in an application I am writing. I am trying to get some of the basic elements going, but I am having a lot of trouble getting the reverse engineering functionality to work (running Eclipse Indigo and the latest version of Hibernate Tools). Basically, when I tell the project to create a new reverse engineering file and specify the configuration file, I get no errors but the wizard does not find any tables or anything in the database, and the process just produces a blank reverse engineering file.
I have set up a Hibernation configuration file and it pings the database successfully. Specifically, I have no idea if the catalog and/or schema properties are correct; as far as I can tell from reading around online, the catalog is just the same as the connection URL, and the schema is anything I decide to name it? The configuration file looks like this:
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 name="sessions">
<property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/test</property>
<property name="hibernate.default_schema">myschema</property>
<property name="hibernate.default_catalog">jdbc:mysql://localhost/test</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">correcthorsebatterystaple</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQL</property>
</session-factory
</hibernate-configuration>
Can anyone lend me a hand?
Thanks,
-TennSeven