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.  [ 2 posts ] 
Author Message
 Post subject: Could not compile the mapping document: MySql.Domain.Users.h
PostPosted: Sat Oct 25, 2008 9:33 pm 
Newbie

Joined: Thu Jul 17, 2008 12:00 am
Posts: 5
Hey Everyone!

So I have been battling with this exception for some time. I am developing a web project. When I attempt to build that applicaiton I get the following exception:

Could not compile the mapping document: MySql.Domain.Users.hbm.xml

The innerexception:


{"Could not find the dialect in the configuration"}

Everything I have read leads me back to a change in NHibernate related to the configuration. I have tried several changes. Most of the examples I have seen appear to be forms apps so they are in the app.config context rather than the web.config like my project. Here is the config section of my web.config:

Code:

<configSections>
    <section
       name="nhibernate"
       type="System.Configuration.NameValueSectionHandler, System,
          Version=1.0.5000.0,Culture=neutral,
          PublicKeyToken=b77a5c561934e089" />
  </configSections>

  <nhibernate>
    <add key="hibernate.connection.provider"
       value="Hibernate.Connection.DriverConnectionProvider"
  />
    <add key="dialect"
       value="NHibernate.Dialect.MySQLDialect"
  />
    <add key="hibernate.connection.driver_class"
       value="NHibernate.Driver.MySqlDataDriver"
   />
    <add key="hibernate.connection.connection_string"
    value="User ID=sa;Password=bingogo867;Data Source=test;Initial Catalog=MyDB"/>

   
  </nhibernate>



Can someone give me some help on this? The Exception occurs when executing the configuration method. THANKS!

Code:
  Configuration cfg = new Configuration();
           
               cfg.AddAssembly("MySql.Domain");

            cfg.Configure();


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 27, 2008 3:49 am 
Regular
Regular

Joined: Tue Jul 29, 2008 3:30 am
Posts: 74
Are you using NHibernate 2?

Then you should read these two breaking changes in NHibernate 2:
Quote:
# <nhibernate> section is ignored, using <hibernate-configuration> section (note that they have different XML formats)
# Configuration values are no longer prefixed by "hibernate.", if before you would specify "hibernate.dialect", now you specify just "dialect"


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