Hibernate version:
Hibernate Tools 3.2.2 Nightly from 9/10/2008
Eclipse Ganymede
Mapping documents:
reveng.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>
<type-mapping>
<sql-type jdbc-type="TINYINT" hibernate-type="yes_no">
</sql-type>
</type-mapping>
<table-filter match-name=".*"></table-filter>
</hibernate-reverse-engineering>
Full stack trace of any exception that occurs:Code:
org.hibernate.console.HibernateConsoleRuntimeException: Could not create or find com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy with one argument delegate constructor
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:358)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:339)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:303)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:283)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:216)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:136)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:880)
at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:966)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:341)
... 12 more
!SUBENTRY 1 org.hibernate.eclipse.console 4 666 2008-09-10 15:02:02.570
!MESSAGE java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy
!STACK 0
java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:341)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:339)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:303)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:283)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:216)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:136)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:880)
at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:966)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Name and version of the database you are using:
MySQl 5.1.26
Custom Class
package com.mycompany.hibernate;
import org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy;
import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
import org.hibernate.cfg.reveng.TableIdentifier;
public class SimpleCustomReverseEngineeringStrategy extends
DelegatingReverseEngineeringStrategy {
public SimpleCustomReverseEngineeringStrategy() {
super(null);
}
public SimpleCustomReverseEngineeringStrategy(ReverseEngineeringStrategy delegate) {
super(delegate);
}
public String columnToPropertyName(TableIdentifier table, String column) {
return super.columnToPropertyName(table, column);
}
}
I'm using the nightly build of Hibernate Tools in Ganymede and can't get it to find my custom reverse engineering class. I have one eclipse project that contains my custom reverse engineering class, the hibernate console configuration, any my other hibernate configuration files (minimal).
I keep getting a dialog with "Could not create or find com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy with one argument delegate constructor"
Things I've tried
- I've confirmed that the console configuration classpath contains the same classpath as the containing eclipse project. This build/classes/ dir does contain my custom .class file.
- Upgraded to the latest nightly build of Hibernate Tools (was using nightly from 8/22). Started Eclipse with a -clean
- Many other things ;)
Has anyone had any luck getting a Custom Reverse Engineering class to run in Hibernate Tools in Eclipse Ganymede? I'm stumped. Thanks