NHibernate Oracle连接? [英] NHibernate Oracle Connection?

查看:98
本文介绍了NHibernate Oracle连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我第一次为NHibernate建立Oracle连接.我已将Oracle.DataAccess.dll文件复制到我的bin文件夹中.无论我尝试什么,我都会收到相同的错误:

I am setting up an Oracle connection for NHibernate for the first time. I have copied the Oracle.DataAccess.dll file into my bin folder. No matter what I try, I keep getting the same error:

Could not load type >NHibernate.Driver.OracleDataClientDriver. Possible cause: no assembly name specified. 

我正在使用以下配置:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
    <session-factory name="DefaultSessionFactory">
        <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
        <property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
        <property name="connection.driver_class">>NHibernate.Driver.OracleDataClientDriver</property>
        <property name="connection.connection_string">Data Source=DB;User ID=USERPassword=****;</property>       
        <property name="show_sql">true</property>
        <mapping assembly="NHibernateExample.DataAccess"/>
    </session-factory>
</hibernate-configuration>

我以前只为SQL Server设置了NHibernate.我在这里想念什么吗?

I have previously only set up NHibernate for SQL Server. Am I missing anything here?

推荐答案

您是否复制并粘贴了代码?因为在connection.driver_class行中有一个额外的>

Did you copy and paste the code? because there's an extra > in there, in the connection.driver_class line

这篇关于NHibernate Oracle连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆