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: Parse error, MappingException
PostPosted: Tue Jul 17, 2007 6:59 am 
Newbie

Joined: Tue Jul 17, 2007 6:44 am
Posts: 5
Hello everybody.

I'm having problems with mapping simple class that has only two properties mapped. This class located in assembly, which is referenced by main program.
Config file looks like follows (version of NHibernate: 1.0.4):

Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" assembly="ObjectProxies" namespace="BindExternalSource">
   <class name="BindedFieldDescription" table="BindedFieldDescription">
      <id name="BindedFieldId" column="BindedFieldId">
         <generator class="native"/>
      </id>
      <property name="Description" column="Description"/>
      <property name="TypeString" column="TypeString"/>      
   </class>
</hibernate-mapping>


I'm recieving exception when I try to add this class to SessionConfiguration, i.e.

Code:
private Configuration _cfg;
_cfg = new Configuration();
_cfg.Configure();
_cfg.AddClass(typeof(BindedFieldDescription));


Exception message as follows:
Code:
"Parse Error, no assembly associated with Xml key a5:http://schemas.microsoft.com/clr/nsassem/NHibernate/NHibernate%2C%20Version%3D1.0.4.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D154fdcb44c4484fc MappingException"


I googled this exception and found nothing that would belong to NHibernate. Can anybody tell me, where is the problem?

Thanks in advance, anyway. :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 18, 2007 4:06 am 
Newbie

Joined: Tue Jul 17, 2007 7:48 am
Posts: 1
try to add :
Configuration cfg = new Configuration();
cfg.AddAssembly("YourProjectAsemblyName");


Top
 Profile  
 
 Post subject: Gotcha
PostPosted: Thu Jul 19, 2007 12:21 am 
Newbie

Joined: Tue Jul 17, 2007 6:44 am
Posts: 5
phang98 wrote:
try to add :
Configuration cfg = new Configuration();
cfg.AddAssembly("YourProjectAsemblyName");

Thanks phang98, but it's not the way to make things work, because I tried do this way first. I recieved this exception because my apps working in remoting, and NHibernate exceptions could not get to the calling program through remoting layer (possibly because they are not serializable). When I attached NHibernate sources into my solution and tried to enter NHibernate code, I clearly understood what was the problem (incorrect mapping). So thank everybody who tried to think aboubt this problem. :)


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.