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: Error : "The hibernate.connection.driver_class ..."
PostPosted: Fri Apr 27, 2007 8:20 am 
Newbie

Joined: Fri Apr 27, 2007 8:00 am
Posts: 2
Hi all,
i'm working with hibernate in C# but i have an error genarated and i don't know the reason!! the message is "The hibernate.connection.driver_class must be specified in the NHibernate configuration section."

however my configuration file is :

<?xml version="1.0" encoding="utf-8"?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0">
<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=ELBIARI_MAJDA;initial catalog=Gestion_froid;User Id=sa;Password=majda;</property>
<property name="show_sql">true</property>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="use_outer_join">true</property>
<mapping assembly="" />
</session-factory>
</hibernate-configuration>



and this is th part of code where the erreor was occured :

Configuration cfg = new Configuration();
cfg.AddAssembly("Gestion_Froid");
ISessionFactory factory = cfg.BuildSessionFactory();
ISession session = factory.OpenSession();
ITransaction transaction = session.BeginTransaction();
mot_de_passe passwd = new mot_de_passe();
passwd.Login = "majda";
passwd.mot_de_passa = "mm";
session.Save(passwd);


Help plzzz and thank's a lot...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 29, 2007 8:15 am 
Newbie

Joined: Fri Jun 29, 2007 7:59 am
Posts: 1
I've got the same problem on a website project. I've searched for some help on other forums but it seems that no one answered where this error has been reported... Does someone have found a solution at this little problem and could share the solution? *crossing fingers*


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 08, 2007 5:06 pm 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
I don't use NHibernate, but maybe the line involved is the cfg.AddAssembly("Gestion_Froid"); one ?

What is it supposed to do ? Are you sure the file you showed above is the one that's parsed, for example ?

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


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.