-->
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.  [ 5 posts ] 
Author Message
 Post subject: class2hbm mapping
PostPosted: Thu Jan 27, 2005 10:54 pm 
Newbie

Joined: Thu Jul 08, 2004 11:20 pm
Posts: 6
Hi,
Using Hbn 3 and Hbn 2.1 the extenstion project, I am attempting to use the class2hbm MapGenerator to read my classes, and make the corresponding mapping files. I am following the syntax (I think) in the reference PDF but am continually getting variations of the error:

Exception in thread "main" java.lang.NoClassDefFoundError: ...

I have installed C:\hibernate-3.0\hibernate-extensions-2.1.3 where the MapGenerator class lives. What is the syntax to run this class over my classes in say C:\dev\projects\*.class?

I tried most recently:

java -cp org.hibernate.tool.class2hbm.MapGenerator --output= my_mapping.xml User in the same directory as the 'User' class. (no joy - java.lang.NoClassDefFoundError: User)

can someone assist on syntax here? Or point me towards I decent web reference?

many thanks

Paul.





Mapping documents:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 28, 2005 4:25 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
class2hbm is not alive anymore. if the docs talks about it ill consider it a bug

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 10:19 am 
Newbie

Joined: Fri Mar 24, 2006 9:31 am
Posts: 10
Location: Berlin, Germany
max wrote:
class2hbm is not alive anymore. if the docs talks about it ill consider it a bug


Why this tool is not supported any more ?
Is there a plan to implement a similar tool generating hibernate mapping files from java 5 persitence annotations?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 2:38 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
because it was not maintained and created bad mappings and that pre jdk 5 classes does not contain enough information to do it decently.

and yes, we would like to extend the annotationconfiguration to be able to build a model from existing classes and via hbm2hbmxml generate mappings etc.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 2:40 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
because it was not maintained and created bad mappings and that pre jdk 5 classes does not contain enough information to do it decently.

and yes, we would like to extend the annotationconfiguration to be able to build a model from existing classes and via hbm2hbmxml generate mappings etc.

patches welcome.

_________________
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.  [ 5 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.