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.  [ 5 posts ] 
Author Message
 Post subject: Could not compile the mapping document:
PostPosted: Fri Jan 02, 2009 9:31 pm 
Newbie

Joined: Fri Jan 02, 2009 9:21 pm
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Mapping documents:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Emulator.DataEntries.Character, Emulator" table="Characters">
<id name="CharacterId" column="CharacterId" length="11">
<generator class="native" />
</id>
<property name="Status" column="Status" type="Int32" length="11" />
<property name="UserId" column="UserId" type="Int32" length="11" />
<property name="Name" column="Name" type="String" length="32" />
<property name="ClassId" column="ClassId" type="Int32" length="11" />
<property name="Level" column="Level" type="Int32" length="11" />
<property name="Job" column="Job" type="Int32" length="11" />
<property name="Strength" column="Strength" type="Int32" length="11" />
<property name="Health" column="Health" type="Int32" length="11" />
<property name="Intelligence" column="Intelligence" type="Int32" length="11" />
<property name="Wisdom" column="Wisdom" type="Int32" length="11" />
<property name="Agility" column="Agility" type="Int32" length="11" />
<property name="Face" column="Face" type="Int32" length="11" />
<property name="Hair" column="Hair" type="Int32" length="11" />
<property name="Experience" column="Experience" type="long" length="11" />
<property name="HP" column="HP" type="Int32" length="11" />
<property name="MP" column="MP" type="Int32" length="11" />
<property name="X" column="X" type="Int32" length="11" />
<property name="Y" column="Y" type="Int32" length="11" />
<property name="Z" column="Z" type="Int32" length="11" />
<property name="StatPoints" column="StatPoints" type="Int32" length="11" />
<property name="SkillPoints" column="SkillPoints" type="Int32" length="11" />
<property name="Contribution" column="Contribution" type="Int32" length="11" />
<property name="Rage" column="Rage" type="Int32" length="11" />
</class>
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():
///
/// Configure NHibernate
///
ServerConsole.WriteLine(Color.Blue,"- [Configuring Database]");
Configuration cfg = new Configuration();
cfg.AddAssembly("Emulator");
Factory = cfg.BuildSessionFactory();


Name and version of the database you are using:
MySQL

When i try to start my prgramm, I get that "Could not compile the mapping document: Emulator.DataEntries.Character.hbm.xml"
Pls help me

Tino


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2009 3:04 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
What does the inner exception say ?

_________________
--Wolfgang


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2009 5:31 pm 
Newbie

Joined: Tue Nov 18, 2008 11:16 am
Posts: 19
try to add this..

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="YOUR ASSEMBLY" namespace="YOUR NAMESPACE">


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2009 10:40 pm 
Newbie

Joined: Fri Jan 02, 2009 9:21 pm
Posts: 2
Its the same problem !

Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 06, 2009 3:39 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Check the inner exception ! What does it say ?

_________________
--Wolfgang


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