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 find the dialect in the configuration
PostPosted: Sun Nov 01, 2009 11:59 pm 
Newbie

Joined: Sun Nov 01, 2009 11:52 pm
Posts: 2
Hi All,

I am new to NHibernate. I use hibernate for my other Java Project. I am facing with this weird exception when I am trying to run my project.

This is my hibernate.cfg.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
  <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
    <session-factory>
      <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
      <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
      <property name="connection.connection_string">Server=(local);database=careerMask;Integrated Security=SSPI</property>
      <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
      <property name="show_sql">true</property>
      <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
    </session-factory>
  </hibernate-configuration>


I have tried placing this code in web.config file, but does not make any difference. This Error message is thrown when trying to compile one of the mapping files.

This is how I am trying to build by session'
Code:
Configuration config = new Configuration();
sessionFactory = config.BuildSessionFactory();

Any help would be wonderful

Thanks,
Rishi


Top
 Profile  
 
 Post subject: Re: could not find the dialect in the configuration
PostPosted: Mon Nov 02, 2009 3:23 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Which NHibernate version do you use ? Check that the file properties are set correct. I think it should be this for hibernate.cfg.xml:

Build Action=None or Content
Copy to Output Directory=Copy always or if newer

_________________
--Wolfgang


Top
 Profile  
 
 Post subject: Re: could not find the dialect in the configuration
PostPosted: Mon Nov 02, 2009 10:41 am 
Newbie

Joined: Sun Nov 01, 2009 11:52 pm
Posts: 2
Hi

Thanks for the reply.

I have used combination of "Copy" and "Content", but nothing seems to work. I am using NHibernate 2.1. I have placed hiberante.cfg.xml and the C# file which invoke session factory in the same package.

Thanks


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.