-->
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.  [ 3 posts ] 
Author Message
 Post subject: Could not load type 'SimpliCity.Business.Department' ...
PostPosted: Tue Oct 04, 2005 5:47 pm 
Newbie

Joined: Tue Oct 04, 2005 5:42 pm
Posts: 5
Location: North Carolina, USA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 6:58 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Some other class has a <one-to-one> reference to the Department, and in that tag the class is specified without the assembly name.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 7:43 pm 
Newbie

Joined: Tue Oct 04, 2005 5:42 pm
Posts: 5
Location: North Carolina, USA
That was it. Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.