-->
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: Plz Help: Multiple projects configuration.
PostPosted: Tue Jun 07, 2005 6:49 am 
Newbie

Joined: Thu May 26, 2005 7:25 am
Posts: 13
Sorry, I cannot find why a I got an exception. This is my first NHibernate project so any help will be very welcome.

I have two projects. The first one starts the configuration (among other things) and loads the hibernate.cfg.xml. The persistant classes are defined on the other projects and I use cfg.AddAssembly(...) from the first one to include the xml descriptors.

Everything works fine until I add a <set/> element between two classes of the second project. Then I got a nasty

Exception: NHibernate.MappingException
Message: associated class not found
Source: NHibernate
at NHibernate.Cfg.Binder.BindOneToMany(XmlNode node, OneToMany model, Mappings mappings)
at NHibernate.Cfg.Binder.BindCollection(XmlNode node, Collection model, String className, String path, Mappings mappings)
at NHibernate.Cfg.CollectionTypeSet.Create(XmlNode node, String prefix, String path, PersistentClass owner, Mappings mappings)
at NHibernate.Cfg.Binder.PropertiesFromXML(XmlNode node, PersistentClass model, Mappings mappings)
at NHibernate.Cfg.Binder.BindRootClass(XmlNode node, RootClass model, Mappings mappings)
at NHibernate.Cfg.Binder.BindRoot(XmlDocument doc, Mappings model)
at NHibernate.Cfg.Configuration.Add(XmlDocument doc)

Nested Exception

Exception: System.TypeLoadException
Message: No se puede cargar el tipo XYZ.Business.Address del ensamblado NHibernate, Version=0.8.3.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc.

(translated version: XYZ.Business.Address from the NHibernate Assembler cannot be loaded)

Source: mscorlib
at System.Type.GetType(String typeName, Boolean throwOnError)
at NHibernate.Cfg.Binder.BindOneToMany(XmlNode node, OneToMany model, Mappings mappings)


associated class not found


I guess it's a inter-assembly problem but can anyone explain me how can I resolve it? Thank you very much.

jv


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 7:01 am 
Newbie

Joined: Thu May 26, 2005 7:25 am
Posts: 13
Ouch! Coming from Hibernate I forgot to specify the assembler:

<one-to-many class="Pue.Business.Address"/>

>>>>

<one-to-many class="Pue.Business.Address, Business"/>

Thanks anyway!

jv


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.