关键配置文件大致如下:
<db:provider id="DbProvider" provider="Oracle.DataAccess.Client"
connectionString="User ID=${db.user};Password=${db.password};Data Source=${db.datasource};"/>
<object id="NHibernateSessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
<property name="DbProvider" ref="DbProvider"/>
<property name="MappingAssemblies">
<list>
<value>CMS.Model</value>
</list>
</property>
<property name="HibernateProperties">
<dictionary>
<entry key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
<entry key="dialect" value="NHibernate.Dialect.OracleDialect"/>
<entry key="hibernate.connection.driver_class" value="NHibernate.Driver.OracleDataClientDriver"/>
数据库为Oracle11g
出错信息:Error creating context 'spring.root': Could not load type NHibernate.Dialect.OracleDialect. Possible cause: no assembly name specified.
貌似这位仁兄也没解决:http://news.cnblogs.com/q/19592/