-->
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.  [ 3 posts ] 
Author Message
 Post subject: hibernatetool is failing
PostPosted: Mon Jun 13, 2005 10:50 am 
Newbie

Joined: Wed Oct 08, 2003 2:07 am
Posts: 3
Location: Jacksonville, FL USA
I get the following error when attempting to execute hbm2java from the hibernate tool. I dug into the jar file and found that this class doesn't exist however the class org.hibernate.mapping.MetaAttribute does.

I got the hibernate-tools.jar from
hibernate-tools-3.0.0.alpha4a.zip/org.hibernate.eclipse_3.0.0.alpha4

I suspected there is an out of date velocity file somewhere, but my grep for MetaAttributable did not reveal it.


Here is the relevant excerpt from my build log.

INFO: Mapping file: C:\home\projects\tgs\src\java\com\tgs\entity\User.hbm.xml
Jun 13, 2005 10:03:28 AM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: com.tgs.entity.User -> users
Jun 13, 2005 10:03:29 AM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing extends queue
Jun 13, 2005 10:03:29 AM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing collection mappings
Jun 13, 2005 10:03:29 AM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing association property references
Jun 13, 2005 10:03:29 AM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
java.lang.NoClassDefFoundError: org/hibernate/mapping/MetaAttributable
at org.apache.tools.ant.Project.executeTarget(Project.java:1224)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.Main.start(Main.java:147)
at org.apache.tools.ant.Main.main(Main.java:230)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:13)
Caused by: java.lang.NoClassDefFoundError: org/hibernate/mapping/MetaAttributable
at org.hibernate.tool.hbm2x.TemplateHelper.<init>(TemplateHelper.java:34)
at org.hibernate.tool.hbm2x.AbstractExporter.setupTemplates(AbstractExporter.java:93)
at org.hibernate.tool.hbm2x.POJOExporter.start(POJOExporter.java:101)
at org.hibernate.tool.ant.GeneratorTask.execute(GeneratorTask.java:33)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:115)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
... 10 more
--- Nested Exception ---


Top
 Profile  
 
 Post subject: Not a macro, it's actually in the code
PostPosted: Mon Jun 13, 2005 10:59 am 
Newbie

Joined: Wed Oct 08, 2003 2:07 am
Posts: 3
Location: Jacksonville, FL USA
I don't have the source version, but I decompiled the code. And found that
Cfg2JavaTool.getMetaAsX() methods expecte MetaAttributable objects as parameters, But it's not being found on my classpath containing hibernate3.jar and hibernate-tools.jar

any Ideas


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 13, 2005 5:21 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
so you is not using the hibernate3.jar which is bundled with hibernatetools.

in this case its 3.0.5

note you dont need to use the exact same hiernate jar with the tools and your own project if you only e.g. use 3.0.3.....but for using the tools you need to use at least the version incldued with the tools.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.