Well...I've been working with this most of the day. I have a mapping file that is being loaded from an assembly named "SimpliCity.Business" which also includes the classes under the same namespace. Here is the mapping:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="SimpliCity.Business.Department, SimpliCity.Business" table="DEPARTMENTS">
<id name="Id" column="ID" type="System.Int32" unsaved-value="0">
<generator class="native" />
</id>
<property name="Name" column="NAME" />
<property name="ServicePhoneNumber" column="SERVICE_PHONE_NO" />
<property name="EmailAddress" column="EMAIL_ADDRESS" />
<property name="Code" column="CODE" />
<property name="LastUpdatedDate" column="LAST_UPDATED_DATE" />
<property name="CreationDate" column="CREATION_DATE" />
<property name="LastUpdatedBy" column="LAST_UPDATED_BY_ID" />
<property name="CreatedBy" column="CREATED_BY_ID" />
</class>
</hibernate-mapping>
I have checked all of my settings and know that SimpliCity.Business.Department is in assembly SimpliCity.Business. However, I get the following error:
TypeLoadException: Could not load type 'SimpliCity.Business.Department' from assembly 'NHibernate, Version=0.99.2.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc'.]
System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +72
System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58
System.Type.GetType(String typeName, Boolean throwOnError) +57
NHibernate.Cfg.Binder.ClassForFullNameChecked(String fullName, String errorMessage) +32
[MappingException: could not find class: SimpliCity.Business.Department]
NHibernate.Cfg.Binder.ClassForFullNameChecked(String fullName, String errorMessage) +82
NHibernate.Cfg.Binder.BindOneToOne(XmlNode node, OneToOne model, Boolean isNullable, Mappings mappings) +239
NHibernate.Cfg.Binder.PropertiesFromXML(XmlNode node, PersistentClass model, Mappings mappings) +695
NHibernate.Cfg.Binder.BindRootClass(XmlNode node, RootClass model, Mappings mappings) +2889
NHibernate.Cfg.Binder.BindRoot(XmlDocument doc, Mappings model) +592
NHibernate.Cfg.Configuration.AddValidatedDocument(XmlDocument doc) +96
NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream) +103
NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly, Boolean skipOrdering) +243
NHibernate.Cfg.Configuration.AddAssembly(String assemblyName) +158
SimpliCity.ObjectAccess.ObjectAccessManager.OpenSession() in C:\Projects\SimpliService\ObjectAccess\ObjectAccessManager.cs:45
SimpliCity.ObjectAccess.Http.NHibernateHttpModule.ContextBeginRequest(Object sender, EventArgs e) in C:\Projects\SimpliService\ObjectAccess\NHibernateHttpModule.cs:37
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Does anyone have any ideas what could be going on? Any help would be greatly appreciated.
|