-->
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.  [ 1 post ] 
Author Message
 Post subject: Problem mit NHibernate.Driver.SqlClientDriver
PostPosted: Wed Apr 26, 2006 8:12 am 
Newbie

Joined: Wed Apr 26, 2006 7:46 am
Posts: 1
Hi,

ich versuche NHibernate (Version 1.0.2.0) mit einem kleinen C#-Konsolenprogramm zu testen und bekomme bei dem Befehl

Code:
ISessionFactory sessionFactory = new NHibernate.Cfg.Configuration().Configure().BuildSessionFactory();


die folgende Fehlermeldung:

Unbehandelte Ausnahme: NHibernate.HibernateException: Could not create the driver from "NHibernate.Driver.SqlClientDriver". ---> System.TypeLoadException: Could not load type '"NHibernate.Driver.SqlClientDriver", NHibernate, Version=1.0.2.0
, Culture=neutral, PublicKeyToken=null', check that type and assembly names are
correct
bei NHibernate.Util.ReflectHelper.ClassForName(String name)
bei NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary sett
ings)
--- Ende der internen Ausnahmestapelüberwachung ---
bei NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary sett
ings)
bei NHibernate.Connection.ConnectionProvider.Configure(IDictionary settings)
bei NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDi
ctionary settings)
bei NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary properties)
bei NHibernate.Cfg.Configuration.BuildSettings()
bei NHibernate.Cfg.Configuration.BuildSessionFactory()
bei TestHibernate.Program.Main(String[] args) in C:\Dokumente und Einstellung
en\MOS.COMPUGROUP\Eigene Dateien\Visual Studio 2005\Projects\TestHibernate\TestH
ibernate\Program.cs:Zeile 18.

Die app.config sieht folgendermaßen aus:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section
        name="hibernate-configuration"
        type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"
        />
  </configSections>
  <hibernate-configuration xmlns="urn:nhibernate-configuration-2.0">
    <session-factory>
      <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
      <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
      <property name="connection.connection_string">Server=localhost;initial catalog=NHibernateTest;Integrated Security=SSPI</property>
      <property name="connection.driver_class">"NHibernate.Driver.SqlClientDriver"</property>
      <mapping assembly="TestHibernate" />
    </session-factory>
  </hibernate-configuration>

</configuration>


Die NHibernate.dll ist verlinkt, allerdings nicht im GAC.

Google habe ich befragt und den Quickstart Guide habe ich auch gelesen, aber ich komme in der Kürze der Zeit, die man mir gewährt nicht dahinter, was schief läuft. Kann mir jemand helfen?

Ich wäre sehr dankbar ;-)
Viele Grüße,

Monika
Code:


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.