-->
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.  [ 9 posts ] 
Author Message
 Post subject: Unknown entity class error
PostPosted: Mon Sep 04, 2006 10:46 am 
Regular
Regular

Joined: Thu Aug 24, 2006 2:05 am
Posts: 80
Hi Grp,

Application is throwing an error "Unknown entity class: DALLibrary.Table1" while calling nHibernate.Save method.

Let me know the solutoin for the same.

-Thanks


Top
 Profile  
 
 Post subject: Re: Unknown entity class error
PostPosted: Tue Sep 05, 2006 11:40 pm 
Newbie

Joined: Tue Sep 05, 2006 11:15 pm
Posts: 7
Are you sure that this problem happen only when you call Save? How about loading it? If it's an unknown entity class, I am doubt that there are something wrong in your mapping file that you're not aware.

deepakbadki wrote:
Hi Grp,

Application is throwing an error "Unknown entity class: DALLibrary.Table1" while calling nHibernate.Save method.

Let me know the solutoin for the same.

-Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 06, 2006 12:47 am 
Regular
Regular

Joined: Tue Feb 21, 2006 9:50 am
Posts: 107
normally i got this error when i add a new mapping file to my project and forget to set it's type to "Embedded Resource".


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 07, 2006 8:58 pm 
Newbie

Joined: Wed Sep 06, 2006 10:35 am
Posts: 14
Would this also occur if my application has a mix of annotation and XML mapping?

in the same test app i have I have one class that uses NHibernate.Mapping.Attributes and one class that has a hmb.xml file that I add as an embedded resource. When I run the app, the former mapping works but I get an "Unknown entity class:" exception in NHibernate.Impl.SessionFactoryImpl.GetPersister(Type theClass)

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 08, 2006 12:27 am 
Regular
Regular

Joined: Tue Feb 21, 2006 9:50 am
Posts: 107
i'm not familiar with the attribute mapping. Maybe the mix causes the error. Did the error occur for the class with the mapping file or for the class with attributes? If you use mapping files you have to rebuild your solution after adding or modifying a mapping file.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 08, 2006 2:36 pm 
Newbie

Joined: Wed Sep 06, 2006 10:35 am
Posts: 14
luedi wrote:
i'm not familiar with the attribute mapping. Maybe the mix causes the error. Did the error occur for the class with the mapping file or for the class with attributes? If you use mapping files you have to rebuild your solution after adding or modifying a mapping file.


It happened with the one that used the mapping file. Unfortunately rebuilding the project didn't fix the error. I will try removing the attribute annotations see if that helps.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 11, 2006 1:28 am 
Regular
Regular

Joined: Thu Aug 24, 2006 2:05 am
Posts: 80
Thanks a lot to All.

The problem was with the xml file.After setting the xml file build action type to "Embeded Resource", it works.

Cheers,
Deepak


Top
 Profile  
 
 Post subject: Unknown Entity
PostPosted: Fri Sep 15, 2006 5:03 pm 
Newbie

Joined: Fri Sep 15, 2006 4:40 pm
Posts: 4
I keep getting the Unknown Entity exception. I check to make sure that my *hbm.xml file is correct. However, when I implemented the method, getHibernateTemplate().get("from User user where user.id = ?",args), I get the exception. I am stuck! I exhausted all the possibilities. Please help.


Top
 Profile  
 
 Post subject: reply of ur error
PostPosted: Sat Sep 16, 2006 2:38 am 
Newbie

Joined: Wed Sep 13, 2006 10:25 am
Posts: 3
luedi wrote:
normally i got this error when i add a new mapping file to my project and forget to set it's type to "Embedded Resource".


hi luedi,
but i am geeting a problem that if i set it's type to embedded resource, the program shows an exception that dialect property is not set, and if set it's type to embeded resource, then it shows an exception on save method that unknown entity type class, pls help

_________________
Amit


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