NHibernate Bug Collection.
1、NHibernate.Cfg.Configuration exception
An exception occurred during configuration of persistence layer.
solution:References log4net DLL
2、No persister for: .....
solution:Change the XML' properties Content to Embedded Resource
3、System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
solution:install the oracle client and register the Oracle.DataAccess.dll on C:\WINNT\assembly(move the dataaccess.dll into assembly)
put this code in the web.config
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<qualifyAssembly partialName="Oracle.DataAccess" fullName="Oracle.DataAccess, Version=2.111.6.0, Culture=neutral, publicKeyToken=89b483f429c47342"/>
</assemblyBinding>
</runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<qualifyAssembly partialName="Oracle.DataAccess" fullName="Oracle.DataAccess, Version=2.111.6.0, Culture=neutral, publicKeyToken=89b483f429c47342"/>
</assemblyBinding>
</runtime>
NHibernate connect RemoteoracleDatabase hibernate.cfg.xml
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider, NHibernate</property>
<property name="connection.driver_class">NHibernate.Driver.OracleDataClientDriver, NHibernate</property>
<property name="connection.connection_string">
Data Source = (
description = (
address_list = (
address = (HOST = Your databaseIP)(PROTOCOL = TCP)(PORT = Port))
)
(connect_data = (
service_name = DatabaseName))
);
User Id=xxxx;Password=*****;
</property>
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.Oracle10gDialect</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<!--please references the NHibernate.ByteCode.Castle.dll-->
<property name="proxyfactory.factory_class">
NHibernate.ByteCode.Castle.ProxyFactoryFactory,
NHibernate.ByteCode.Castle
</property>
<mapping assembly="NHibernateSample.Domain"/>
</session-factory>
</hibernate-configuration>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider, NHibernate</property>
<property name="connection.driver_class">NHibernate.Driver.OracleDataClientDriver, NHibernate</property>
<property name="connection.connection_string">
Data Source = (
description = (
address_list = (
address = (HOST = Your databaseIP)(PROTOCOL = TCP)(PORT = Port))
)
(connect_data = (
service_name = DatabaseName))
);
User Id=xxxx;Password=*****;
</property>
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.Oracle10gDialect</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<!--please references the NHibernate.ByteCode.Castle.dll-->
<property name="proxyfactory.factory_class">
NHibernate.ByteCode.Castle.ProxyFactoryFactory,
NHibernate.ByteCode.Castle
</property>
<mapping assembly="NHibernateSample.Domain"/>
</session-factory>
</hibernate-configuration>