-->
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: Could not interpret type: user
PostPosted: Wed Nov 16, 2005 7:39 am 
Hi, all.

I'm trying to figure out how to fix this little(?) problem that i'm having.

A wild guess is that my entity is to complex/large for NHibernate to handle, thats the only thing I can think of. But on the other hand, my knowlange is very limited.


Quote:
could not interpret type: User
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: NHibernate.MappingException: could not interpret type: User


Is the error I keep getting (and if it's not that error, it's "input string is not correct format" error I get).


XML file:

Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" schema="dbo">
   <class name="PolitisktTiers.Objs.User, PolitisktTiers" table="tbl_Users">
      <id name="Id" type="Int32" column="UserID">
         <generator class="identity" />
      </id>
      <property name="Aim" column="AIM" type="String" />
      <bag name="ArticleComments" inverse="true">
         <key column="CommentorID" />
         <one-to-many class="PolitisktTiers.Objs.ArticleComment, PolitisktTiers" />
      </bag>
      <bag name="Articles" inverse="true">
         <key column="AuthorID" />
         <one-to-many class="PolitisktTiers.Objs.Article, PolitisktTiers" />
      </bag>
      <property name="Birthday" column="Birthday" type="DateTime" />
      <property name="City" column="City" type="String" />
      <property name="Civilstatus" column="Civilstatus" type="String" />
      <property name="County" column="County" type="String" />
      <bag name="Diaries" inverse="true">
         <key column="UserID" />
         <one-to-many class="PolitisktTiers.Objs.Diary, PolitisktTiers" />
      </bag>
      <property name="Email" column="Email" type="String" />
      <property name="EnableDisplayUndreadThreadsOnly" column="EnableDisplayUndreadThreadsOnly" type="Boolean" />
      <property name="EnableHtmlEmail" column="EnableHtmlEmail" type="Boolean" />
      <property name="EnableSearchSuggestions" column="EnableSearchSuggestions" type="Boolean" />
      <property name="EnableThreadTracking" column="EnableThreadTracking" type="Boolean" />
      <property name="FavoriteDrink" column="FavoriteDrink" type="String" />
      <property name="FavoriteFood" column="FavoriteFood" type="String" />
      <property name="Firstname" column="Firstname" type="String" />
      <bag name="Guestbooks" inverse="true">
         <key column="FromUserID" />
         <one-to-many class="PolitisktTiers.Objs.Guestbook, PolitisktTiers" />
      </bag>
      <property name="Icq" column="ICQ" type="String" />
      <property name="Interests" column="Interests" type="String" />
      <property name="LastAction" column="LastAction" type="String" />
      <property name="LastActivity" column="LastActivity" type="DateTime" />
      <property name="LastLogin" column="LastLogin" type="DateTime" />
      <property name="Lastname" column="Lastname" type="String" />
      <property name="LoginCount" column="LoginCount" type="Int32" />
      <property name="Msn" column="MSN" type="String" />
      <property name="NuclareQuestion" column="NuclareQuestion" type="String" />
      <property name="Password" column="Password" type="Byte()" />
      <property name="Personality" column="Personality" type="String" />
      <property name="PoliticalAbode" column="PoliticalAbode" type="String" />
      <property name="Presentation" column="Presentation" type="String" />
      <property name="Reads" column="Reads" type="String" />
      <property name="RegisterDate" column="RegisterDate" type="DateTime" />
      <bag name="Relationships" inverse="true">
         <key column="User1_ID" />
         <one-to-many class="PolitisktTiers.Objs.Relationship, PolitisktTiers" />
      </bag>
      <bag name="Roles" table="tbl_UsersInRoles">
         <key column="UserID" />
         <many-to-many column="RoleID" class="PolitisktTiers.Objs.Role, PolitisktTiers" />
      </bag>
      <property name="ShowMyEmail" column="ShowMyEmail" type="Boolean" />
      <property name="Theme" column="Theme" type="String" />
      <property name="TotalArticles" column="TotalArticles" type="Int32" />
      <property name="TotalPosts" column="TotalPosts" type="Int32" />
      <bag name="ToUserGuestbooks" inverse="true">
         <key column="ToUserID" />
         <one-to-many class="PolitisktTiers.Objs.Guestbook, PolitisktTiers" />
      </bag>
      <bag name="User2Relationships" inverse="true">
         <key column="User2_ID" />
         <one-to-many class="PolitisktTiers.Objs.Relationship, PolitisktTiers" />
      </bag>
      <property name="UserAccountStatus" column="UserAccountStatus" type="Int32" />
      <one-to-one name="UserAvatar" class="PolitisktTiers.Objs.UserAvatar, PolitisktTiers" />
      <property name="Username" column="Username" type="String" />
      <one-to-one name="UsersOnline" class="PolitisktTiers.Objs.UsersOnline, PolitisktTiers" />
      <bag name="VisitorLogs" inverse="true">
         <key column="UserID" />
         <one-to-many class="PolitisktTiers.Objs.VisitorLog, PolitisktTiers" />
      </bag>
      <bag name="VisitorUserVisitorLogs" inverse="true">
         <key column="VisitorUserID" />
         <one-to-many class="PolitisktTiers.Objs.VisitorLog, PolitisktTiers" />
      </bag>
      <property name="Yim" column="YIM" type="String" />
   </class>
</hibernate-mapping>


Top
  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 11:52 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
This error probably means that the mapping of "User" hasn't been passed to NHibernate.

There are load of topics about this common issue (do a search of MappingException on this forum)...

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


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.