Hello,
I have a weird problem when using ant and the hbm2java-task. Invocation results in the following exception:
Code:
BUILD FAILED
[hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)
[hibernatetool] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
[hibernatetool] log4j:WARN Please initialize the log4j system properly.
BUILD FAILED
java.lang.NoSuchMethodError: org.hibernate.mapping.Table.qualify(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;C)Ljava/lang/String;
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1225)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
Caused by: java.lang.NoSuchMethodError: org.hibernate.mapping.Table.qualify(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;C)Ljava/lang/String;
at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:413)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:56)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:731)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:122)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:73)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:180)
at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:196)
at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:90)
at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.configureExporter(Hbm2JavaGeneratorTask.java:37)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:38)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:144)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
... 6 more
--- Nested Exception ---
java.lang.NoSuchMethodError: org.hibernate.mapping.Table.qualify(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;C)Ljava/lang/String;
at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:413)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:56)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:731)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:122)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:73)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:180)
at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:196)
at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:90)
at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.configureExporter(Hbm2JavaGeneratorTask.java:37)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:38)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:144)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
Running the eclipse code generation wizard with the same configration works fine. Version 3.1.0-beta1 worked fine, too - but I want to switch to beta2 because of the solved jdk5-problems ;-)
Any idea what's going wrong?
I am using Hibernate version 3.1 and Hibernate Tools 3.1.0-beta2.
Thanks
Heinz