This is a migrated thread and some comments may be shown as answers.

Oracle.DataAccess not found issues

3 Answers 1210 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Anwar
Top achievements
Rank 1
Anwar asked on 03 Aug 2015, 08:36 AM

I am using odp.net to access an oracle db with Telerik Data Access.

I previously had an older version of odp.net installed on my dev machine, which I removed (11.2) and replaced with an updated version (12.1)

 When I try to access my telerik data objects, I am now getting the following error:

{"Message":"An error has occurred.","ExceptionMessage":"System.Configuration.ConfigurationErrorsException: Database provider      Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342 not installed properly (CLR=v4.0.30319 64bit). ---> System.IO.FileNotFoundException: Could not load file or assembly 'Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.\r\n}

What do I need to update in order for Data Access to use the latest oracle client?

 Thanks!

 

3 Answers, 1 is accepted

Sort by
0
Ralph Waldenmaier
Telerik team
answered on 04 Aug 2015, 07:10 AM
Hi Anwar,
Thank you for contacting us.
There are two possible reasons for such erros.

1. You installed the Oracle driver for the wrong platform. Can you please ensure that your Oracle.DataAccess dll platform version matches your project's platform. For an x86 platform, you need the x86 Oracle.DataAccess assemby. Same goes for x64. In case your project is configured to use Any CPU, then you need the platform of your OS.

2. You are missing an assembly redirect in either your machine.config or your app.config. See the following snippet for an example of such a redirect.
<addname="Oracle Data Provider for .NET"invariant="Oracle.DataAccess.Client"description="Oracle Data Provider for .NET"type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.112.2.40, Culture=neutral, PublicKeyToken=89b483f429c47342"/>

Please adjust the version information to match the one which is installed on your system.

I hope this information is helpful for you.
Do come back in case you have any other question.


Regards,
Ralph Waldenmaier
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
0
Anwar
Top achievements
Rank 1
answered on 06 Aug 2015, 03:04 PM

Hi Ralph, 

Adding the assembly redirect did the trick for me :). I am still not sure to understood how the initial assembly reference  2.102.2.20 was added in the first place? Is it that when you create the project, Telerik data has an internal reference to this assembly? Also I have noticed that you don't need a reference to this assembly for your project to compile, so it is more some kind of a runtime requirement?

 

 

0
Ralph Waldenmaier
Telerik team
answered on 07 Aug 2015, 09:35 AM
Hi Anwar,
I am glad that you were able to get your project up and running.
Telerik DataAccess is initially linked against this version of the Oracle driver but is not enforcing this version. Adding the redirect solves this issue in this case. Though, usually this redirect is automatically added to the machine.config during the installation of the driver.

Regarding your question for the driver reference: The reference to this assembly is not needed when the driver is installed in your GAC and the .net runtime is able to resolve the dependency in this case. You can find more details about this here.

Feel free to ask in case you have any other question.

Regards,
Ralph Waldenmaier
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Tags
Data Access Free Edition
Asked by
Anwar
Top achievements
Rank 1
Answers by
Ralph Waldenmaier
Telerik team
Anwar
Top achievements
Rank 1
Share this question
or