-->
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: Fri Oct 02, 2009 7:17 am 
Newbie

Joined: Fri Oct 02, 2009 6:59 am
Posts: 2
Hi,

New to NHibernate. Downloaded a simple example (after looking around for a while).
It is working ok.

The problem is that the example was a single project. I wanted to isolate the Data layer so i transfered the code+file+references+app.config to a class project.

I tried to call the 'Data layer' project from another project.I get :
'Could not compile the mapping document: PersonTop.Person.hbm.xml' exception
and
'Could not find the dialect in the configuration' as innerexception.

I repeat everything (files+files properties+references+etc......) is the same.

- using NHibernate 2.0.1 + VS2008 + SQLite 3

App.config
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <configSections>
      <section
        name="hibernate-configuration"
        type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"
    />
   </configSections>
   <!-- Add this element -->
   <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
      <session-factory>
         <property name="dialect">NHibernate.Dialect.SQLiteDialect</property>
         <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
         <property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property>
         <property name="connection.connection_string">Data Source=C:\Infos\SQLLite\Teste\GlobalData.db3;Version=3;New=True;</property>
         <property name="connection.release_mode">on_close</property>
      </session-factory>
   </hibernate-configuration>

</configuration>


I'm not putting neither code or mapping file because everything works , as long as i keep everything together in the same project.

Help please


Top
 Profile  
 
 Post subject: Re: {"Could not find the dialect in the configuration"}
PostPosted: Tue Oct 06, 2009 5:48 am 
Newbie

Joined: Tue Oct 06, 2009 5:32 am
Posts: 2
try the code below:
dialect = NHibernate.Dialect.SQLiteDialect, NHibernate
connection.driver_class = NHibernate.Driver.SQLite20Driver, NHibernate


Check http://stackoverflow.com/questions/1460045/sql-data-sqllite-version-with-nhibernate-2-1 for more information :)

Hope to help,
Dan


Top
 Profile  
 
 Post subject: Re: {"Could not find the dialect in the configuration"}
PostPosted: Wed Oct 07, 2009 9:25 am 
Newbie

Joined: Fri Oct 02, 2009 6:59 am
Posts: 2
chdisme wrote:
try the code below:
dialect = NHibernate.Dialect.SQLiteDialect, NHibernate
connection.driver_class = NHibernate.Driver.SQLite20Driver, NHibernate


Check http://stackoverflow.com/questions/1460045/sql-data-sqllite-version-with-nhibernate-2-1 for more information :)

Hope to help,
Dan


Thanks for the reply.

Doesn't work.

I gave up on having a total isolated Data Layer. Now only classes and hbms are in separated assembly.
That worked (so far).

NHibernate is a very big nag in configuration.

Thanks again.


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.