473,804 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

nHibernate mapping exception

Hello All,
I am new to hibernate and new to nHibernate. I created a small app and
when i try and run it i get the error i posted at the bottom of this
message. I am using the helper class that can be found here
http://blogs.intesoft.net/simon/articles/16.aspx#36 . Does anyone know
why this error might occur.. i have NO IDEA.... if you require anymore
information please let me know and i will send it through.
Thanks in advance!
Erin

Server Error in '/test/nHibernateTest' Application.
--------------------------------------------------------------------------------

Unknown entity class:
nHibernateTest. Persistence.nHi bernate.Sharepo intObjectTitles
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.Mapp ingException: Unknown entity class:
nHibernateTest. Persistence.nHi bernate.Sharepo intObjectTitles

Source Error:
Line 149: public static void Load(System.Typ e type, object id)
Line 150: {
Line 151: Database.Sessio n.Load(type, id);
Line 152: }
Line 153:
Source File:
c:\inetpub\wwwr oot\test\nhiber natetest\nhiber natehelper\data base.cs
Line: 151

Stack Trace:
[MappingExceptio n: Unknown entity class:
nHibernateTest. Persistence.nHi bernate.Sharepo intObjectTitles]
NHibernate.Impl .SessionFactory Impl.GetPersist er(Type theClass)
NHibernate.Impl .SessionImpl.Ge tClassPersister (Type theClass)
NHibernate.Impl .SessionImpl.Do LoadByClass(Typ e clazz, Object id,
Boolean checkDeleted, Boolean allowProxyCreat ion)
NHibernate.Impl .SessionImpl.Lo ad(Type clazz, Object id)
nHibernateTest. NHibernateHelpe r.Database.Load (Type type, Object id)
in
c:\inetpub\wwwr oot\test\nhiber natetest\nhiber natehelper\data base.cs:151
nHibernateTest. nHibernateTest. Page_Load(Objec t sender, EventArgs e)
in c:\inetpub\wwwr oot\test\nhiber natetest\nhiber natetest.aspx.c s:29
System.Web.UI.C ontrol.OnLoad(E ventArgs e)
System.Web.UI.C ontrol.LoadRecu rsive()
System.Web.UI.P age.ProcessRequ estMain()

Apr 11 '06 #1
1 13712
Erin,

Try to get your answer from this forum:
http://forum.hibernate.org/viewforum.php?f=25

Cheers,
kids

er************@ cowaninsuranceg roup.com wrote:
Hello All,
I am new to hibernate and new to nHibernate. I created a small app and
when i try and run it i get the error i posted at the bottom of this
message. I am using the helper class that can be found here
http://blogs.intesoft.net/simon/articles/16.aspx#36 . Does anyone know
why this error might occur.. i have NO IDEA.... if you require anymore
information please let me know and i will send it through.
Thanks in advance!
Erin

Server Error in '/test/nHibernateTest' Application.
--------------------------------------------------------------------------------

Unknown entity class:
nHibernateTest. Persistence.nHi bernate.Sharepo intObjectTitles
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.Mapp ingException: Unknown entity class:
nHibernateTest. Persistence.nHi bernate.Sharepo intObjectTitles

Source Error:
Line 149: public static void Load(System.Typ e type, object id)
Line 150: {
Line 151: Database.Sessio n.Load(type, id);
Line 152: }
Line 153:
Source File:
c:\inetpub\wwwr oot\test\nhiber natetest\nhiber natehelper\data base.cs
Line: 151

Stack Trace:
[MappingExceptio n: Unknown entity class:
nHibernateTest. Persistence.nHi bernate.Sharepo intObjectTitles]
NHibernate.Impl .SessionFactory Impl.GetPersist er(Type theClass)
NHibernate.Impl .SessionImpl.Ge tClassPersister (Type theClass)
NHibernate.Impl .SessionImpl.Do LoadByClass(Typ e clazz, Object id,
Boolean checkDeleted, Boolean allowProxyCreat ion)
NHibernate.Impl .SessionImpl.Lo ad(Type clazz, Object id)
nHibernateTest. NHibernateHelpe r.Database.Load (Type type, Object id)
in
c:\inetpub\wwwr oot\test\nhiber natetest\nhiber natehelper\data base.cs:151
nHibernateTest. nHibernateTest. Page_Load(Objec t sender, EventArgs e)
in c:\inetpub\wwwr oot\test\nhiber natetest\nhiber natetest.aspx.c s:29
System.Web.UI.C ontrol.OnLoad(E ventArgs e)
System.Web.UI.C ontrol.LoadRecu rsive()
System.Web.UI.P age.ProcessRequ estMain()

Apr 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2730
by: Rob | last post by:
We are starting a new fairly big project based on the typical 3-tier approach (db, business, GUI layer). I have limited experience in that field but from my experience all the stored procedures, com object, etc is quite cumbersome and error prone. Therefore, I am currently looking into some OR Mappers. I did a very simple sample project with Wilson's ORMapper. It seems to me ORMappers are exactly what I am looking for. In any case, I...
8
8478
by: Roman | last post by:
Hello i got this simple problem using nhibernate. I want to chang the id( primary key of the) object and update it, to change this key. i me getting nhibernate exception like this: identifier of an instance of {0} altered from {1} ({2}) to {3} ({4}) // in place of number, there are values and their types. can anyone help me?
1
2562
by: Ram | last post by:
Hey, I'm having a trouble mapping a connecting between 2 of my tables. We have 2 tables - the simplest "dept", "emp" tables which are mapped to 2 classes. Class Dept contains 2 properties for emps - 1 for manager and the second for workers (Collection). How can I map this? We can add additional fields in the emp table that indicates the property in the depts?
1
12740
by: sternr | last post by:
Hey, I'm using NHibernate version: 1.0.0.2 My Mapping documents: <class name="DM.Book" table="Books"> <id column="bookId" name="bookId"> <generator class="assigned" /> </id> <property column="name" name="name" />
5
2629
by: Prem Kumar | last post by:
Hi Can somebody throw some light on what are these tools and which is the best to use? I would like to know, where do these tools fit in ? and how does it help? Thanks Prem
0
3466
by: Pieter | last post by:
Hi, I'm using NHibernate 1.2 (CR1), and I'm using a custom list (inherited from BindingList(Of T) ) for all my lists. The NHibernate documentation told me that I had to implement IUserCollectionType to my custom list, which I did. But I still get an error when trying to read the object: " {"Unable to cast object of type 'NHibernate.Collection.Generic.PersistentGenericBag`1' to
4
3337
by: IceMan | last post by:
Hi, I am using the configuration object and passing it a Assembly object to load. The assembly object i pass in is from a dll which is in a different folder then the Nhibernate dll. The AddAssembly(Assembly assembly) function throws me an Error saying it can't load the configuration hbm.xml file because it can't load the assembly in the hbm.xml file. Why does NHibernate try to load the Assembly again??
0
6308
by: Jacques Vandensavel | last post by:
I have a legacy table which is composed out three key fields. It is representing a bank. I'm using NHibernate in my ASP.NET application to glue everything together. I'm already searching for an answer the last couple of weeks, but to no aval. The table layout is: * customer id * bank name * bank account no status
14
3692
by: thj | last post by:
Hi, I was wondering what you guys are using and why? LINQ to SQL or NHibernate? Thanks in advance, Tommy
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10354
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10101
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9177
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6870
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3005
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.