-->
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.  [ 1 post ] 
Author Message
 Post subject: Error using hibernate with rcp
PostPosted: Thu Jun 20, 2013 5:54 pm 
Newbie

Joined: Thu Jun 20, 2013 5:41 pm
Posts: 1
I get a MappingNotFoundException when trying to use hibernate within my RCP application. I can use hibernate just fine
in my Java code. I downloaded the latest stable hibernate release (4.2.2) and included all required jars in a plug-in project.
I've implemented the buddy-loading technique. I'm using an annotation based hibernate model with resources mapped
to hibernate.cfg.xml. I've implemented my sessionFactory as follows:

File configFile = new File("absolute file path of hibernate.cfg.xml here");
Configuration cfg = new Configuration();
sessionFactory = cfg.configure(configFile).buildSessionFactory(); //throws error here

In my plugin.xml's runtime classpath I have the folder containing my hbm.xml files listed.

An example of my mappings:

<mapping resource="hibernate/model/Address.hbm.xml"/>

Any insight provided would be greatly appreciated!


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

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.