-->
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.  [ 3 posts ] 
Author Message
 Post subject: Could not compile the mapping document ...
PostPosted: Wed Apr 11, 2007 2:43 pm 
Newbie

Joined: Wed Apr 11, 2007 2:39 pm
Posts: 6
Hibernate version:
1.2

Mapping documents:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Player" table="player">
<!-- A 32 hex character is our surrogate key. It's automatically
generated by NHibernate with the UUID pattern. -->
<id name="Id">
<column name="id" sql-type="char(32)" not-null="true"/>
<generator class="uuid.hex" />
</id>
<property name="Name">
<column name="name" length="16" not-null="true" />
</property>
<property name="Level"/>
</class>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():

tx = i.BeginTransaction();
Player p = new Player();
p.Name = "Bob";
p.Level = 34;

i.Save(p);
tx.Commit();





The error I am getting is:
"Could not compile the mapping document Jinx.Player.hbm.xml"


I am wondering if there's a way to make it spit out a more detailed explanation as to where the error is coming from. Ive seen posts on googles with similar MappingExceptions, except they received additional details on the cause of the error.

Can anyone help me in tracking this down? Ive spent quite some time trying to get things working. =(


Top
 Profile  
 
 Post subject: Hmmm
PostPosted: Wed Apr 11, 2007 3:20 pm 
Newbie

Joined: Wed Apr 11, 2007 2:39 pm
Posts: 6
I just found out more information, the additional error message is, "The dialect was not set. Set the property hibernate.dialect."


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 12, 2007 3:26 am 
Newbie

Joined: Mon Mar 26, 2007 3:33 am
Posts: 18
have you set the Dialect property in Hibernate.cfg.xml?


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