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
|