Summary: When I attempt to use the Reverse engineering tool from within Eclipse with the Hibernate plug-in I get a IndexOutOfBoundsException originating from the org.hibernate.tool.hbm2x.DocExporter.generatePackageSummary method.
I did not think this was a Eclipse-Hibernate config problem because I was able to reverse engineer a very simple schema (the ImageDb schema from the Spring samples) but now I'm not sure. I've simplified my own schema down to a single very dumb table.
My hibernate.cfg.xml looks correct since I can look at the Hibernate Configurations tab in eclipse and see the table I'm trying to reverse engineer.
When I select the Schema Documentation exporter and attempt the reverse engineering process the assets, entities, tables directories and various Index.html files are created. At that point I see the IndexOutOfBounds Exception.
If I deselect the Schema Documentation exporter and any combination of the other options nothing seems to happen and I don't see anything in the error log.
I've double checked the jave vm (jdk1.5.0_10) and the dialect versus how the MySql tables are being created.
At this point I'm going to bail out of the Hibernate Eclipse tool on the assumption that there is an underlying error that I'm missing and do the mappings by hand.
What would help is if someone could post their Eclipse Configuration Details from a working Hibernate Tools installation so I can rule that out as a problem.
Hibernate version: Hibernate 3.2
Implementation-Title: Hibernate3
Implementation-Version: 3.2.4.sp1
Hibernate-Version: 3.2.4.sp1
Eclipse Version:
Version: 3.2.2
Build id: M20070212-1330
Hibernate Plug-in
Hibernate Tools 3.2.0.beta9a
Name and version of the database you are using:
Server version: 5.0.41-community-nt MySQL Community Edition (GPL)
Hibernate Config file
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/TopicTreeEditor</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
Full stack trace of any exception that occurs:
!SUBENTRY 1 org.hibernate.eclipse.console 4 666 2007-07-25 10:33:21.250
!MESSAGE java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
!STACK 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.remove(ArrayList.java:389)
at org.hibernate.tool.hbm2x.DocExporter.generatePackageSummary(DocExporter.java:386)
at org.hibernate.tool.hbm2x.DocExporter.doStart(DocExporter.java:161)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$1.execute(CodeGenerationLaunchDelegate.java:257)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:228)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:130)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:639)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:565)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:754)
at org.eclipse.debug.internal.ui.DebugUIPlugin$5.run(DebugUIPlugin.java:827)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
|