-->
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: newbie: hibernate console without xml mapping files
PostPosted: Tue Nov 06, 2007 5:33 am 
Beginner
Beginner

Joined: Tue Nov 06, 2007 5:13 am
Posts: 28
Is it possible to use the hibernate console (in eclipse) for a project, if I do not use hibernate .xml mapping files (using only annotations in the source code)?

if the answer is NO - forget the rest...

details:
I have a simple sample application, with one entity bean (using hibernate annotations) and a hibernate-console.properties file (but NO hibernate .xml mapping files - only source code annotations).
I can successfully create a hibernate configuration, I can also open the Database node and see my tables in the database.
BUT: I cannot create a session factory (pop-up menu entry is deactivated)

Environment:
Database: Oracle
JBoss IDE 2.0.0.Beta2
Hibernate Console: 3.2.0beta8

I found lots of documentation and FAQ - but none of them really answered my question - or maybe I just didn't understand it, since I'm completely new to all that java, hibernate stuff...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 6:42 am 
Beginner
Beginner

Joined: Tue Nov 06, 2007 5:13 am
Posts: 28
sorry, guys - now I found the problem:
I forgot to add the mapping of my classes to the hibernate.cfg.xml

<mapping class="com.twentyfouract.test000.entity.WebUser"/>

now the session factory works, as expected


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.