-->
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: Mapping files seem not found by NHibernate (NH 2.0.1.GA)
PostPosted: Thu May 28, 2009 8:38 am 
Newbie

Joined: Thu May 28, 2009 4:08 am
Posts: 3
I failed to run the example in https://www.hibernate.org/362.html with NH 2.0.1.GA. Having compiling info from web, I still cannot run the example successfully. The current problem is that mapping file, User.hbm.xml, seems not found at runtime by NH.

I just copy mapping file to the same directory where the .exe resides. Is that right? Or NH got other mechanism to read mapping file.

Codes example will be provided later. Thanks.

Rds,
Ricky


Top
 Profile  
 
 Post subject: Re: Mapping files seem not found by NHibernate (NH 2.0.1.GA)
PostPosted: Thu May 28, 2009 11:25 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Have a look at this:

http://nhforge.org/wikis/howtonh/your-first-nhibernate-based-application.aspx

_________________
--Wolfgang


Top
 Profile  
 
 Post subject: Re: Mapping files seem not found by NHibernate (NH 2.0.1.GA)
PostPosted: Thu May 28, 2009 10:37 pm 
Newbie

Joined: Thu May 28, 2009 4:08 am
Posts: 3
Hi,
I leafed through it, finding it seem suitable to .NET 3 above. Does it work for 2.x as well?

Thanks,
Ricky.


Top
 Profile  
 
 Post subject: Re: Mapping files seem not found by NHibernate (NH 2.0.1.GA)
PostPosted: Thu May 28, 2009 10:58 pm 
Newbie

Joined: Thu May 28, 2009 4:08 am
Posts: 3
Hi, my current exception is

NHibernate.MappingException: No persister for: NHibernate.Examples.QuickStart.User

Ricky


Top
 Profile  
 
 Post subject: Re: Mapping files seem not found by NHibernate (NH 2.0.1.GA)
PostPosted: Fri May 29, 2009 1:39 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
http://nhforge.org/doc/nh/en/index.html#configuration-programmatic

There are different ways for telling hibernate where to get the mapping from. Depending on what type you use, there're several possible solutions to your problem. And the guide does work for 2.0,3.0,3.5.

_________________
--Wolfgang


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.