← Back to team overview

maria-discuss team mailing list archive

New Question: Hibernate Reverse Engineering wizard with MariaDB

 

Hello,

A new question has been asked in "MariaDB Documentation" by JohnD:
--------------------------------
(Sorry, couldn't find a good place for this query - perhaps there ought to be a folder "MariaDB and ORMs"?)

I'm trying to use the Hibernate Reverse Engineering wizard with MariaDB. It's just a very simple example, but I am stuck. I don't see any errors, but it doesn't work as described.

Here's what I've got so far:

  * Windows 7 x64, Eclipse Juno, MariaDB v5.5.3, Hibernate v4.2.3
  * I've got an example with Hibernate running using annotations and the same instance of MariaDB, no problem
  * Now I want to create the classes from the tables, so I'm trying to use the reverse engineering wizard.
  * I've set up a simple DB and a couple of tables
  * I've set up a hibernate.cfg.xml file using the same values as my working annotation example
  * Now I use the wizard (in Eclipse) to "New/Hibernate Reverse Engineering File (reveng.xml)"
  ** First page ok, second page "Configure Table filters" is where I'm stuck
  ** I select the correct Console configuration (generated as part of creating the config file)
and then press the "Refresh" button
  ** At this point I should see my two tables in the "Database schema:" column. But it's empty.
  ** I briefly see "Pending..." - then nothing.
  ** I can't see any errors.

So, how to move forwards? Can I turn on some logging? Where is the error? What logs to check?

The Eclipse console window shows a bunch of stuff, all info, no errors and the last three lines are like this:

* 2013-08-22 11:34:38,189 DEBUG Worker-33 org.hibernate.connection.DriverManagerConnectionProvider - opening new JDBC connection
* 2013-08-22 11:34:38,198 DEBUG Worker-33 org.hibernate.connection.DriverManagerConnectionProvider - created connection to: jdbc:mysql://localhost:3306/omthibernate, Isolation Level: 4
* 2013-08-22 11:34:38,199 INFO Worker-33 org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:mysql://localhost:3306/omthibernate

In case it helps, here is the hibernate config (I've tried a lot of variations):

{{{
<?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="xxx">
  <property name="hibernate.connection.driver_class">org.mariadb.jdbc.Driver</property>
  <property name="hibernate.connection.password">password</property>
  <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/omthibernate</property>
  <property name="hibernate.connection.username">user</property>
  <property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
 </session-factory>
</hibernate-configuration>
}}}

--------------------------------

To view or answer this question please visit: http://kb.askmonty.org/en/hibernate-reverse-engineering-wizard-with-mariadb/