nHibernate: Unable to locate persister -


running vs2003, nhb 3.0.0.3001, trying run unit test through gallio 3.2. code first session of "summer of nhibernate". getting following error when attempting run test.

nhibernate.hibernateexception: unable locate persister: datatransfer.customer targetsite: void onload(nhibernate.event.loadevent, nhibernate.event.loadtype) helplink: null @ nhibernate.event.default.defaultloadeventlistener.onload(loadevent event, loadtype loadtype) @ nhibernate.impl.sessionimpl.fireload(loadevent event, loadtype loadtype) @ nhibernate.impl.sessionimpl.get(string entityname, object id) @ nhibernate.impl.sessionimpl.get(type entityclass, object id) @ nhibernate.impl.sessionimpl.get[t](object id) @ dataaccesslayer.nhibernatedataprovider.getcustomerbyid(int32 customerid)  

my uneducated guess customer class cannot seen. both unit test , data access layers have reference datatransfer assembly holds customer class. customer class public , properties public virtual.

the nhb config file in directory, , customer mapping file embedded resource. seems fail on line:

return session.get<customer>(customerid); 

  1. make sure mapping file named *.hbm.xml

  2. make sure set embedded resource.

  3. if these fail, debug , when fails, catch exception , @ innerexception - nhibernate has fantastic error messaging hidden in there.

hope thigs out - otherwise can other options (but 1 , 2 solve 90% of persister problems)


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -