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.  [ 4 posts ] 
Author Message
 Post subject: "Entity Class not Found" - (hbm.xml are embedded
PostPosted: Thu Jan 04, 2007 11:31 am 
Newbie

Joined: Thu Jan 04, 2007 10:50 am
Posts: 8
OK,

I've trawled the site for info on this before posting, however it seems mostly people just forgot to embed the hbm.xml files.

I myself have done this but to no avail, and when I try and save a mapped class, using ISession.Save method, receive the Entity Class not found message as part of MappingException.

Does anyone have any ideas? Did anyone get to this point and actually find a solution? The hbm.xml files appear to load ok, and the session holds the correct, open db connection...

Many thanks

Tom.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 2:24 pm 
Beginner
Beginner

Joined: Tue May 02, 2006 8:04 am
Posts: 34
Correct type and assemblynames?


Top
 Profile  
 
 Post subject: Assembly and type
PostPosted: Thu Jan 04, 2007 4:11 pm 
Newbie

Joined: Thu Jan 04, 2007 10:50 am
Posts: 8
Hello

well my assembly name is PropertyTrackerBusiness

as an example, my simple class Property is

namespace PropertyTrackerBusiness.Domain
{
class Property
{
public props......


..



my Property.hbm.xml file is

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="PropertyTrackerBusiness.Domain.Property, PropertyTrackerBusiness" table="Properties">
<id name="Id" column="Id" type="Int64" unsaved-value="0">
<generator class="identity" />
</id>
<property name="Description" column="Description" type="String" length="50"/>
<property name="Address1" column="Address1" type="String" length="50"/>
<property name="Address2" column="Address2" type="String" length="50"/>
<property name="Town" column="Town" type="String" length="50"/>
<property name="County" column="County" type="String" length="50"/>
<property name="Postcode" column="Postcode" type="String" length="50"/>
<property name="Country" column="Country" type="String" length="50"/>
</class>
</hibernate-mapping>

And this file is embedded.

In fact, I have checked the configuration object at runtime and it has imported all of my definitions.

Yet as soon as I do session.Save(property) it just says it can't find the entity.....


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 06, 2007 2:30 pm 
Regular
Regular

Joined: Wed Jun 21, 2006 3:13 pm
Posts: 110
What is the full stack trace?


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