org.hibernate.tool.hbm2x.ExporterExcept when reverse engineering a DB

Description

Hi,

I am trying to use hibernate tools in eclipse to reverse engineer a complex db, and I sometimes get "org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: persist.eXacto.Left with template pojo/Pojo.ftl" type exceptions.

After much tries, I have been able to track the error down to the following schema: https://smg8.ulb.ac.be/hib/SQLdiag.gif . The sql to create the problematic schema is the following: https://smg8.ulb.ac.be/hib/create_DB.sql .

The stack trace reported by Hibernate tools through the eclipse error log is here: https://smg8.ulb.ac.be/hib/stacktrace.log . The configuration files are here: https://smg8.ulb.ac.be/hib/logback.xml ; https://smg8.ulb.ac.be/hib/hibernate.reveng.xml ; https://smg8.ulb.ac.be/hib/persistence.xml .

I have not been able to log anything else from Hibernate other than the error stacktrace here above, altough I tried to configure logback correctly and enabled sql debugging in persistence.xml. What is missing to enable detailed log output?

Please tell me if you need any other information. I am beginner in Hibernate. Thank you for any help or pointer.
Olivier

Environment

MS SQL database 2005 : Microsoft SQL Server Management Studio 9.00.3042.00 Microsoft Analysis Services Client Tools 2005.090.3042.00 Microsoft Data Access Components (MDAC) 2000.085.1132.00 (xpsp.080413-0852) Microsoft MSXML 2.6 3.0 4.0 6.0 Microsoft Internet Explorer 7.0.5730.11 Microsoft .NET Framework 2.0.50727.1433 Operating System 5.1.2600 eclipse Platform 3.4.1, build M20080911-1700 JBoss Hibernate Tools, 3.2.4.CR1-R200812191611

Attachments

7

Activity

Show:

Max Rydahl AndersenFebruary 17, 2009 at 1:06 PM

applied to hibernatetools core trunk. Added actual test for this at the low levels too.

Max Rydahl AndersenFebruary 5, 2009 at 2:30 PM

I just have not had time to incorporate the issue.

Will make sure it gets into the next release.

Olivier CaillouxJanuary 28, 2009 at 11:19 PM

Thanks once again for the patch and the fast action, and sorry to insist, but how should I update to a version including the patch? (I hope there is a simpler way than recompiling hibernate tools...)

I am using JBoss Tools Development update site in eclipse, and updated to today's version, but that does not help.

The patched file is java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java. Indeed there is such a file (in .class form) in hibernate-tools.jar, both in the org.hibernate.eclipse_3.2.4.CR2-R200901280154 and in the org.hibernate.eclipse_3.2.4.CR1-R200812191611 version of the plugin I used before. But both class files are identical, so obviously the today version does not include the patch. Is that intended?

Thank you for any pointer and sorry if it is stupid and simple... I really looked hard and found no doc on that subject.
Olivier

Olivier CaillouxJanuary 19, 2009 at 7:34 PM

Thanks for the patch and the workaround (which is however not so useful in my case because the full db is complex and I'd like to use the many-to-many detection when rev. eng. it). Sorry if this is a stupid question, but do you know when will the patched version be available in the eclipse update repository / maven?
OIivier

Anthony PatricioJanuary 19, 2009 at 5:21 PM

patch is attached.

FYI a workaround is to disable many-to-many detection.

Fixed

Details

Assignee

Reporter

Bug Testcase Reminder (view)

Bug reports should generally be accompanied by a test case!

Bug Testcase Reminder (edit)

Bug reports should generally be accompanied by a test case!

Participants

Anthony Patricio
Koen Aers
Max Rydahl Andersen
Olivier Cailloux

Components

Fix versions

Affects versions

Priority

Created January 15, 2009 at 5:47 PM
Updated April 27, 2016 at 11:35 AM
Resolved February 17, 2009 at 1:06 PM