本文介绍了NHibernate-在配置中找不到(oracle)方言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经关注了hibernate.cfg.xml

I've got following hibernate.cfg.xml

<hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2" >
<session-factory>
    <property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
    <property name="connection.connection_string">
  User ID=user;Password=password;Data Source=database
</property>
    <property name="show_sql">false</property>
    <property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
    <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
    <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
</session-factory>

现在我收到以下错误:

有人可以帮我找到他为什么找不到司机吗?一些额外的信息...目前仅在UnitTest应用程序中运行 我将NHibernate和System.Data.OracleClient添加到项目的引用中 使用最新的NHibernate版本(2.2 beta)

Can anyone help me out why he cannot find the driver?Some extra info... It's running at the moment only inside a UnitTest application I added the NHibernate and System.Data.OracleClient to the references of the project Using the latest NHibernate version (2.2 beta)

预先感谢

推荐答案

NHibernate程序集中没有NHibernate.Dialect.Oracle9Dialect方言.

There is no NHibernate.Dialect.Oracle9Dialect dialect in the NHibernate assembly.

有一个NHibernate.Dialect.Oracle9iDialect.

There is a NHibernate.Dialect.Oracle9iDialect.

检查您的NHibernate配置文件是否已正确加载.使用类似的东西:

Check that your NHibernate config file is being loaded correctly. Use something like:

onfiguration config = new Configuration().Configure("hibernate.cfg.xml").

这是假设您的NHibernate配置文件称为hibernate.cfg.xml,它位于应用程序的根目录.

This is assuming your NHibernate configuration file is called hibernate.cfg.xml and is at the root of your application.

这篇关于NHibernate-在配置中找不到(oracle)方言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 02:23