-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: ant task hbm2java fails when using Hibernate Tools beta2
PostPosted: Mon Dec 19, 2005 10:46 am 
Newbie

Joined: Wed Nov 16, 2005 7:40 am
Posts: 5
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 11:33 am 
Newbie

Joined: Wed Nov 16, 2005 7:40 am
Posts: 5
Hello,

I have found the reason - there was still an older version of the hibernate-tools.jar in the classpath - shame on me :-(

Bye

Heinz


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.