Oracle.DataAccess not found issues

4 posts, 0 answers
  1. Anwar
    Anwar avatar
    14 posts
    Member since:
    Oct 2012

    Posted 03 Aug 2015 Link to this post

    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!

     

  2. Ralph Waldenmaier
    Admin
    Ralph Waldenmaier avatar
    202 posts

    Posted 04 Aug 2015 Link to this post

    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.
  3. DevCraft banner
  4. Anwar
    Anwar avatar
    14 posts
    Member since:
    Oct 2012

    Posted 06 Aug 2015 in reply to Ralph Waldenmaier Link to this post

    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?

     

     

  5. Ralph Waldenmaier
    Admin
    Ralph Waldenmaier avatar
    202 posts

    Posted 07 Aug 2015 Link to this post

    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.
Back to Top