These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: OracleDataClientDriver for "Oracle.DataAccess.Client&am
PostPosted: Thu Apr 09, 2009 7:19 am 
Beginner
Beginner

Joined: Mon Jan 05, 2009 7:08 am
Posts: 24
Trying to use "Oracle.DataAccess.Client" for a project:
Code:
      Message   "Could not create the driver from NHibernate.Driver.OracleDataClientDriver."   string
-      [NHibernate.HibernateException]   {"Could not create the driver from NHibernate.Driver.OracleDataClientDriver."}   NHibernate.HibernateException
...
The IDbCommand and IDbConnection implementation in the assembly Oracle.DataAccess could not be found. Ensure that the assembly Oracle.DataAccess is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the application configuration file to specify the full name of the assembly.


My cfg file looks like this:
Code:
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
            <property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
            <property name="connection.driver_class">NHibernate.Driver.[b]OracleDataClientDriver[/b]</property>
            <property name="connection.connection_string">CONN_STR$</property>
            <property name="show_sql">true</property>


I understand (and it works fine) that for "System.Data.OracleClient" is done like this:
Code:
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
         <property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
         <property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
         <property name="connection.connection_string">$CONN_STR$</property>
         <property name="show_sql">true</property>


But for ODP.NET (Oracle.DataAccess.Client) - do we use "OracleDataClientDriver" instead of "OracleClientDriver"? (I got this Googling... see this for example: http://oracleatdotnet.blogspot.com/2007 ... -hood.html)

Why am I getting the exceptions?
Thanks


Top
 Profile  
 
 Post subject: assemblyBinding fixed it
PostPosted: Thu Apr 09, 2009 9:06 am 
Beginner
Beginner

Joined: Mon Jan 05, 2009 7:08 am
Posts: 24
errr....

I added this to app.config

Code:
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <qualifyAssembly partialName="Oracle.DataAccess" fullName="Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
      </assemblyBinding>


Seems to have fixed the problem - not sure if I understand why... suppose I need to readup on assembly binding.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.