sürücüyü oluşturulamadı 'Sigaf.Presupuesto.EntidadesDAL.NHibernate.NHiberna için TypeInitializationException
İşte istisna yükselterek kod NHibernate.Driver.OracleDataClientDriver
{ "tür başlatıcısı teSessionManager' NHibernate.Driver.OracleDataClientDriver sürücüyü oluşturulamadı. "}
A "
{bir iç haricinde}
" istisna. attı Birkaç tane daha iç istisnalar beni NRE'ye götürür:
Nesne referansı değil bir nesnenin bir örneğine. NHibernate.Driver.OracleDataClientDriver..ctor() Bu kod uygulaması diğer benzer, çözümler için çalışmaktadır
NHibernate v3.0 Hedef Çerçeve v4.0 de
.
Ah, Hibernate.config dosyası:
<?xml version="1.0"?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.Dialect.Oracle10gDialect</property>
<property name="current_session_context_class">web</property>
<property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
<property name="connection.driver_class">NHibernate.Driver.OracleDataClientDriver</property>
<property name="connection.connection_string_name">Sigaf</property>
<property name="default_schema">PRE</property>
<property name="show_sql">true</property>
<mapping assembly="Sigaf.Presupuesto.EntidadesDAL" />
</session-factory>
</hibernate-configuration>
Bunu veri erişim projemde yaptım, ancak çalışmadı. Bunu bir kez uygulama projemde yaptım (MVC3). – Alex
Bu mantıklı, bir proje sadece bir referansın derleme gerektirdiği meclisleri getirecektir. Yansıma/yapılandırma sadece referanslar olan bu tür referanslar için, bunların ana projede olması gerekir. – Rich