Unable to load Oracle.DataAccess

Hi ,
I have created a website project on .net framework 4.0 in Visual Studio 2010 . But I am unable to add reference the Oracle.DataAccess dll. It is continously throwing the error " unable to load assembly Oracle.DataAccess . The system cannot find the file specified. "
But when I tried adding the reference in a web application project , it gets added. But when run the project it is throwing the same error. On the web page the error thrown is this :
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Oracle.DataAccess' could not be loaded.
=== Pre-bind state information ===
LOG: User =***********
LOG: DisplayName = Oracle.DataAccess
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Oracle.DataAccess | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
Any help on this , please.. I have been trying all sorts of things and nothing seems to workl.

BadImageFormatException occurs when you have a bit mismatch.
1) What is the TargetCPU set to when you compiled?
2) Are you running the app on 32 bit or 64 bit OS?
3) Confirm whether the app is running as 32 bit or 64 bit in the problem environment (open task manager, click the process tab, is there a *32 next to the name?)
4) Did you install 32 bit Oracle client or 64 bit Oracle client?
Cheers,
Greg

Similar Messages

  • A sign Applet unable to load "oracle.jdbc.OracleDriver" class

    hi,
    i am chiranjit , i am now working in a web based ERP. where i am using a signed applet which unable to load "oracle.jdbc.OracleDriver" class but it easily loading "sun.jdbc.odbc.JdbcOdbcDriver", i am also giving my code:
    import java.sql.*;
    import java.math.*;
    import java.io.*;
    import java.awt.*;
    class JdbcTest extends Applet{
    public static void main (String args[]) throws SQLException {
    // Load Oracle driver
    DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
    // Connect to the local database
    Connection conn =
    DriverManager.getConnection
    ("jdbc:oracle:thin:@192.168.16.7:1521:kris",
    "plsql", "oracle");
    // Query the employee names
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("SELECT FIRST_NAME FROM
    AUTHORS");
    // Print the name out
    while (rset.next ())
    System.out.println (rset.getString (1));
    // Close the result set, statement, and the connection
    rset.close();
    stmt.close();
    conn.close();
    }

    Hint: The sun.jdbc.odbc.JdbcOdbcDriver is available in any JRE distribution. The Oracle driver is not.

  • Loading Oracle.DataAccess, Version=2.102.2.20 using Reflection

    Hi,
    I 'm trying to load the Oracle.DataAccess, Version=2.102.2.20 assembly using Reflection in VS.NET2005. But I'm getting the next message:
    "Could not load file or assembly 'Oracle.DataAccess.Client' or one of its dependencies. The system cannot find the file specified.":"Oracle.DataAccess.Client"}
    fileName: "Oracle.DataAccess.Client"
    This exception is thrown by the next code:
    System.Reflection.Assembly.Load("Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342");
    If I specified the full path of the assembly instead of the fullname then it works; but the idea is to use the assembly fullname instead.
    Domebody has any idea how to overcome this exception?

    Can you please check if the Oracle.DataAccess, Version=2.102.2.20 assembly is installed in the GAC?

  • Unable to load Oracle XML SQL utility

    The following error appears for each java
    class, when we attempt to load Oracle XML sql
    utility into Oracle using the oraclexmlsqlload
    script:
    E.g.
    Error while resolving class OracleXMLStore
    ORA-00904: invalid column name
    Does anyone know why we would receive this error?
    Platform: Hp-UX 11.0
    Oracle Version: 8.1.5.0
    Background information:
    The database was original created with the
    compatible=8.0.5 set in the init.ora file, and
    the creatation of java classes failed due to this,
    so switched compatible to 8.1.0. Now after we
    we adjusted the compatible setting and restarted
    database, we started to receive the errors as
    described above.
    null

    Murali,
    Thank you, after I initialized Oracle's javavm
    the errors disappeared.
    The scripts were located under the javavm/install
    directory.
    Thanks again.
    Murali K (guest) wrote:
    : Hi Steven,
    : Is the JavaVM loaded. i.e. are all the classes necessary for
    : running Java in the server are loaded into the server? The
    most
    : common answer to your problem is that the javavm has not been
    : initialized correctly or the database does not have all the
    java
    : library files necessary to load java programs.
    : Please read chapter 4 in the Oracle8i java developers guide
    : which talks about initializing a java-enabled database by
    : running the initjvm script.
    : If this still occurs then maybe it is a bug and we will have
    to
    : look at it.
    : Thx
    : Murali
    : Steven Wegner (guest) wrote:
    : : The following error appears for each java
    : : class, when we attempt to load Oracle XML sql
    : : utility into Oracle using the oraclexmlsqlload
    : : script:
    : : E.g.
    : : Error while resolving class OracleXMLStore
    : : ORA-00904: invalid column name
    : : Does anyone know why we would receive this error?
    : : Platform: Hp-UX 11.0
    : : Oracle Version: 8.1.5.0
    : : Background information:
    : : The database was original created with the
    : : compatible=8.0.5 set in the init.ora file, and
    : : the creatation of java classes failed due to this,
    : : so switched compatible to 8.1.0. Now after we
    : : we adjusted the compatible setting and restarted
    : : database, we started to receive the errors as
    : : described above.
    null

  • Unable to load oracle.jdbc.driver.OracleDriver class

    i want to connect my java application with oracle database but i m getting an error -"class not found exception oracle.jdbc.driver.OracleDriver " which is written in Class.forName() to register the driver for DriverManager.
    plz help me..

    This is an old class, not included with the JDK anymore. It was made obsolete by
    DataSource which is a connection pool and not a single connection.

  • Unable to load database connector - using JRC w/report connecting to Oracle

    A simple Java program was created to test a Crystal Report using JRC. The Java program is a thick-client Swing desktop application (modified from an example of crxi_r2_migrating_rdc_to_jrc.pdf). The program failed to execute the report with the following error:
    Unable to load database connector u2018com.crystaldecisions.reports.queryengine.driverImpl.DriverLoader'
    It might be something simple to correct the problem, but I am not able to find related answers in the documentation and from the forum.
    CR version is XI R2. The Java program was compiled and run using jdk1.4.2_13. Oracle is 10.2.
    Do I have to use JDBC? or the CR Oracle driver will do? What needs to be setup? If I use JDBC, what do I need to setup (I tried to following the links in the forums or other documentation, but most of the links to http://support.businessobjects.com/.... are broken - i.e. re-route to the SAP support page but not directly linked to the articles)
    When the report JRCTestReport.rpt was saved with the option "Save Data With Report", it works fine. So the problem is only with Oracle database driver, the other jars are fine.
    In the report JRCTestReport.rpt the database properties are:
           DatabaseDLL             crdb_oralce.dll
           Password
           Server                        myTestDB
           Trusted_Connection    False
           User ID                      MyUser
    The crdb_oracle.dll is located at:
    C:\Program Files\Business Objects\Common\3.5\bin
    Files are stored in the following tree structure:
    <Testing Folder>
         JRCTest.java
         JRCTest.class
         WEB-INF
                   lib
                        All required JRC jars and CRConfig.xml
         Reports
                   JRCTestReport.rpt
    Java source code JRCTest.java
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    import com.crystaldecisions.ReportViewer.*;
    // Use this for talking to JRC in-process
    import com.crystaldecisions.reports.sdk.*;
    import com.crystaldecisions.sdk.occa.report.reportsource.*;
    public class JRCTest
         private static void createAndShowGUI()
              try
                   //Make sure we have nice window decorations.
                   JFrame.setDefaultLookAndFeelDecorated(false);
                   //Create and set up the window.
                   JFrame frame = new JFrame("JRCTest");
                   frame.setTitle("JRCTest");
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   ReportViewerBean viewer = new ReportViewerBean();
                                      System.out.println("ReportViewerBean.init");
                   viewer.init(new String[0], null, null, null);
                                      System.out.println("new ReportClientDocument");
                   ReportClientDocument rpt = new ReportClientDocument();
                                      try
                                              System.out.println("Openning Report...");
                                              rpt.open("JRCTestReport.rpt", 0);
                                      catch (Exception ex)
                                              System.out.println("Failed to open report");
                                              System.out.println(ex.toString());
                                              return;
                                      try
                                              System.out.println("logon...");
                                              rpt.getDatabaseController().logon("myUser", "myPass");
                                      catch (Exception ex)
                                              System.out.println("Failed to logon");
                                              System.out.println(ex.toString());
                                              return;
                                      System.out.println("ReportClientDocument.getReportSource");
                   IReportSource rptSource = rpt.getReportSource();
                   viewer.setReportSource(rptSource);
                                                    System.out.println("viewer.setReportSource");
                   frame.getContentPane().add
                        (viewer, BorderLayout.CENTER);
                   frame.setSize(700, 500);
                   frame.setVisible(true);
                   viewer.start();
              catch (Exception exception)
                   System.out.println(exception.toString());
         public static void main(String[] args)
              javax.swing.SwingUtilities.invokeLater(new Runnable()
                   public void run()
                        createAndShowGUI();
    Execution result:
    C:\tmp\CrystalJavaTest>java -classpath .;./WEB-INF/lib;./WEB-INF/lib/ReportViewe
    r.jar;./WEB-INF/lib/jrcerom.jar;./WEB-INF/lib/jrcadapter.jar;./WEB-INF/lib/Concu
    rrent.jar;./WEB-INF/lib/CrystalCharting.jar;./WEB-INF/lib/CrystalCommon.jar;./WE
    B-INF/lib/CrystalContentModels.jar;./WEB-INF/lib/CrystalExporters.jar;./WEB-INF/
    lib/CrystalExportingBase.jar;./WEB-INF/lib/CrystalFormulas.jar;./WEB-INF/lib/Cry
    stalQueryEngine.jar;./WEB-INF/lib/CrystalReportEngine.jar;./WEB-INF/lib/CrystalR
    eportingCommon.jar;./WEB-INF/lib/icu4j.jar;./WEB-INF/lib/keycodeDecoder.jar;./WE
    B-INF/lib/log4j.jar;./WEB-INF/lib/MetafileRenderer.jar;./WEB-INF/lib/rasapp.jar;
    ./WEB-INF/lib/rascore.jar;./WEB-INF/lib/rpoifs.jar;./WEB-INF/lib/Serialization.j
    ar;./WEB-INF/lib/URIUtil.jar;./WEB-INF/lib/xercesImpl.jar;./WEB-INF/lib/xml-apis
    .jar JRCTest
    Starting
    Crystal Report Viewer 2.1.21.2
    java.vendor = Sun Microsystems Inc.
    java.version = 1.4.2_13
    os.name = Windows XP
    os.version = 5.1
    os.arch = x86
    ReportViewerBean.init
    new ReportClientDocument
    Openning Report...
    logon...
    ReportClientDocument.getReportSource
    viewer.setReportSource
    ERROR - JRCAgent1 detected an exception: Unable to load database connector 'com.
    crystaldecisions.reports.queryengine.driverImpl.DriverLoader'.
            at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwRepo
    rtSDKException(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.if(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.a(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.byte(Unknown Source)
            at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unkno
    wn Source)
            at com.crystaldecisions.proxy.remoteagent.y.a(Unknown Source)
            at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.cf.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unkno
    wn Source)
            at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage
    (Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource
    .getPage(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReport
    Source.getPage(Unknown Source)
            at com.businessobjects.crystalreports.viewer.core.rs.b.if(Unknown Source
            at com.businessobjects.crystalreports.viewer.core.av.a(Unknown Source)
            at com.businessobjects.crystalreports.viewer.core.av.run(Unknown Source)
            at java.lang.Thread.run(Thread.java:534)
    Unable to load database connector 'com.crystaldecisions.reports.queryengine.driv
    erImpl.DriverLoader'.

    After I switched the report to use JDBC, I am still getting the same error.
    Machine has multiple jdk, oracle 10g, Oracle11g client installed though. So I need to set my path to use the jdk from Crystal Report and Oracle 10g.
    The program was compiled and ran with the following path and CLASSPATH:
    set path="C:\Program Files\Business Objects\j2sdk1.4.2_08\bin";"C:\Program Files\Business Objects\j2sdk1.4.2_08\jre\bin";"C:\Program Files\Business Objects\j2sdk1.4.2_08\jre\bin\client";c:\oracle\ora102\bin
    set CLASSPATH=.;./WEB-INF/lib;./WEB-INF/lib/ReportViewer.jar;./WEB-INF/lib/jrcerom.jar;./WEB-INF/lib/jrcadapter.jar;./WEB-INF/lib/Concurrent.jar;./WEB-INF/lib/CrystalCharting.jar;./WEB-INF/lib/CrystalCommon.jar;./WEB-INF/lib/CrystalContentModels.jar;./WEB-INF/lib/CrystalExporters.jar;./WEB-INF/lib/CrystalExportingBase.jar;./WEB-INF/lib/CrystalFormulas.jar;./WEB-INF/lib/CrystalQueryEngine.jar;./WEB-INF/lib/CrystalReportEngine.jar;./WEB-INF/lib/CrystalReportingCommon.jar;./WEB-INF/lib/icu4j.jar;./WEB-INF/lib/keycodeDecoder.jar;./WEB-INF/lib/log4j.jar;./WEB-INF/lib/MetafileRenderer.jar;./WEB-INF/lib/rasapp.jar;./WEB-INF/lib/rascore.jar;./WEB-INF/lib/rpoifs.jar;./WEB-INF/lib/Serialization.jar;./WEB-INF/lib/URIUtil.jar;./WEB-INF/lib/xercesImpl.jar;./WEB-INF/lib/xml-apis.jar;C:/oracle/ora102/jdbc/lib/ojdbc14.jar
    I modified my java testing program to display more info:
    Modified program:
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    import com.crystaldecisions.ReportViewer.*;
    // Use this for talking to JRC in-process
    import com.crystaldecisions.reports.sdk.*;
    import com.crystaldecisions.sdk.occa.report.reportsource.*;
    import com.crystaldecisions.sdk.occa.report.exportoptions.*;
    import com.crystaldecisions.sdk.occa.report.data.*;
    import com.crystaldecisions.sdk.occa.report.lib.PropertyBag;
    import com.crystaldecisions.sdk.occa.report.lib.IStrings;
    public class JRCTest2
       private static void createAndShowGUI()
          try
             System.out.println("Starting");
             //Make sure we have nice window decorations.
             JFrame.setDefaultLookAndFeelDecorated(false);
             //Create and set up the window.
             JFrame frame = new JFrame("JRCTest2");
             frame.setTitle("Testing 1, 2, 3");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             System.out.println("new ReportViewerBean");
             ReportViewerBean viewer = new ReportViewerBean();
             System.out.println("ReportViewerBean.init");
             viewer.init(new String[0], null, null, null);
             System.out.println("new ReportClientDocument");
             ReportClientDocument rpt = new ReportClientDocument();
             try
                 System.out.println("Openning Report...");
                 rpt.open("JRCTestReport.rpt", 0);
             catch (Exception ex)
                System.out.println("Failed to open report");
                System.out.println(ex.toString());
                return;
             try
                // try logon here to see if any exceptions
                rpt.getDatabaseController().logon("myUser", "myPass");
             catch (Exception ex)
                System.out.println("Failed to logon");
                System.out.println(ex.toString());
                return;
             IDatabase idb = rpt.getDatabaseController().getDatabase();
             Tables dtb = idb.getTables();
             IConnectionInfo conInfo = dtb.getTable(0).getConnectionInfo();
             PropertyBag attrs = conInfo.getAttributes();
             conInfo.setPassword("myPass");
             conInfo.setUserName("myUser");
             IStrings s = attrs.getPropertyIDs();
             for (int i=0; i < s.size(); i++)
                System.out.println(s.getString(i));
                System.out.println(attrs.getStringValue(s.getString(i)));
             System.out.println(" ");
             conInfo.setAttributes(attrs);
             attrs = conInfo.getAttributes();
             s = attrs.getPropertyIDs();
             // Print property again after setting attributes
             for (int i=0; i < s.size(); i++)
               System.out.println(s.getString(i));
               System.out.println(attrs.getStringValue(s.getString(i)));
             System.out.println(" ");
             System.out.println("ReportClientDocument.getReportSource");
             IReportSource rptSource = rpt.getReportSource();
             viewer.setReportSource(rptSource);
             frame.getContentPane().add
         (viewer, BorderLayout.CENTER);
             frame.setSize(700, 500);
             frame.setVisible(true);
             viewer.start();
          catch (Exception exception)
             System.out.println(exception.toString());
       public static void main(String[] args)
          System.out.println("main");
          javax.swing.SwingUtilities.invokeLater(new Runnable()
             public void run()
                createAndShowGUI();
    Running result:
    C:\tmp\CrystalJavaTest>java JRCTest2
    main
    Starting
    new ReportViewerBean
    Crystal Report Viewer 2.1.21.2
    java.vendor = Sun Microsystems Inc.
    java.version = 1.4.2_13
    os.name = Windows XP
    os.version = 5.1
    os.arch = x86
    ReportViewerBean.init
    new ReportClientDocument
    Openning Report...
    Trusted_Connection
    false
    Server Name
    dbHost
    Connection String
    Use JDBC=b(true);Connection URL=s(jdbc:oracle:thin:@dbHost:1521:myDB);Database Class Name=s(oracle.jdbc.OracleDriver);Server=s(dbHost);User ID=s(myUser);Password=;Trusted_Connection=b(false);JDBC Connection String=s(!oracle.jdbc.OracleDriver!jdbc:oracle:thin:/@dbHost:1521:myDB)
    Server Type
    JDBC (JNDI)
    Database Class Name
    oracle.jdbc.OracleDriver
    Use JDBC
    true
    URI
    !oracle.jdbc.OracleDriver!jdbc:oracle:thin:/@dbHost:1521:myDB
    Database DLL
    crdb_jdbc.dll
    Trusted_Connection
    false
    Server Name
    dbHost
    Connection String
    Use JDBC=b(true);Connection URL=s(jdbc:oracle:thin:@dbHost:1521:myDB);Database Class Name=s(oracle.jdbc.OracleDriver);Server=s(dbHost);User ID=s(myUser);Password=;Trusted_Connection=b(false);JDBC Connection String=s(!oracle.jdbc.OracleDriver!jdbc:oracle:thin:/@dbHost:1521:myDB)
    Server Type
    JDBC (JNDI)
    Database Class Name
    oracle.jdbc.OracleDriver
    Use JDBC
    true
    URI
    !oracle.jdbc.OracleDriver!jdbc:oracle:thin:/@dbHost:1521:myDB
    Database DLL
    crdb_jdbc.dll
    ReportClientDocument.getReportSource
    ERROR - JRCAgent1 detected an exception: Unable to load database connector 'com.crystaldecisions.reports.queryengine.driverImpl.DriverLoader'.
            at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.if(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.a(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.byte(Unknown Source)
            at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
            at com.crystaldecisions.proxy.remoteagent.y.a(Unknown Source)
            at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.cf.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPage(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.getPage(Unknown Source)
            at com.businessobjects.crystalreports.viewer.core.rs.b.if(Unknown Source)
            at com.businessobjects.crystalreports.viewer.core.av.a(Unknown Source)
            at com.businessobjects.crystalreports.viewer.core.av.run(Unknown Source)
            at java.lang.Thread.run(Thread.java:534)
    Unable to load database connector 'com.crystaldecisions.reports.queryengine.driverImpl.DriverLoader'.
    Also got similar error when the path and classpath was switched to Oracle 11g.
    Is there a way to tell which file that it failed to load?
    Thanks
    Kin

  • Parser Error Message: Could not load file or assembly 'Oracle.DataAccess, V

    I'm working on a 64 bit windows 7 ultimate system and I can't get the Oracle.DataAccess and Oracle.Web to load on the helloworld web page
    See error below. At the very end i have the gacutil output. Also, the same dll's work on a 32 bit windows 7 system. I've also tried to load the beta version of the odac 64 bit
    but it it gets a "java stopped working error"
    Thanks in advance
    WEB PAGE ERRORVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
    Server Error in '/test/helloworld' Application.
    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
    Parser Error Message: Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
    Source Error:
    Line 37:                     <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    Line 38:                     <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    Line 39:                     <add assembly="Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
    Line 40:                     <add assembly="Oracle.Web, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89B483F429C47342"/></assemblies>
    Line 41:           </compilation>
    Source File: C:\inetpub\wwwroot\test\helloworld\web.config Line: 39
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89b483f429c47342' could not be loaded.
    === Pre-bind state information ===
    LOG: User = IIS APPPOOL\DefaultAppPool
    LOG: DisplayName = Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89b483f429c47342
    (Fully-specified)
    LOG: Appbase = file:///C:/inetpub/wwwroot/test/helloworld/
    LOG: Initial PrivatePath = C:\inetpub\wwwroot\test\helloworld\bin
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\inetpub\wwwroot\test\helloworld\web.config
    LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
    LOG: Post-policy reference: Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89b483f429c47342
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/test_helloworld/480589f5/895d06ab/Oracle.DataAccess.DLL.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/test_helloworld/480589f5/895d06ab/Oracle.DataAccess/Oracle.DataAccess.DLL.
    LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/test/helloworld/bin/Oracle.DataAccess.DLL.
    LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/test/helloworld/bin/Oracle.DataAccess/Oracle.DataAccess.DLL.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/test_helloworld/480589f5/895d06ab/Oracle.DataAccess.EXE.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/test_helloworld/480589f5/895d06ab/Oracle.DataAccess/Oracle.DataAccess.EXE.
    LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/test/helloworld/bin/Oracle.DataAccess.EXE.
    LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/test/helloworld/bin/Oracle.DataAccess/Oracle.DataAccess.EXE.
    Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
    gacuil output
    VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
    C:\Users\Administrator>C:\"Program Files"\"Microsoft SDKs"\Windows\v6.0A\Bin\x64
    \gacutil.exe /l Oracle.DataAccess
    Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
    Copyright (c) Microsoft Corporation. All rights reserved.
    The Global Assembly Cache contains the following assemblies:
    Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89b483f4
    29c47342, processorArchitecture=x86
    Edited by: burk_s on Jun 6, 2010 2:42 PM

    Hi Mubarak,
    Please firstly make sure you installed SharePoint Foundation 2010 with SP2 in a Windows Server 2012 R2. Since only SP2 slipstream installations are supported on Windows Server 2012 R2
    http://blogs.technet.com/b/stefan_gossner/archive/2014/05/03/sharepoint-2010-sp2-and-windows-server-2012-r2.aspx
    http://blogs.technet.com/b/stefan_gossner/archive/2013/09/19/slipstream-version-of-sharepoint-foundation-2010-with-sp2-included.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Could not load file or assembly 'Oracle.DataAccess error on server

    I have been building a.NET application on my local Machine Windows 7 and have the 32-bit ODT installed on my machine which works nicely with VS 2010.
    I placed it on the server and when I open the page that accesses data from Oracle, I get the below error. Both the server and my local computer have the Oracle.DataAccess
    dll installed and both have the same public token 89b483f429c47342. I changed the target CPU from Any CPU to x86 and published a Release build of my project to the server.
    Why am I getting the below error?
    ==========================================================================================================
    Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' could not be loaded.
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    Stack Trace:
    [FileNotFoundException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.]
    antac.dashboard.Page_Load(Object sender, EventArgs e) in C:\Users\George\Documents\Visual Studio 2010\Projects\antac\antac\dashboard.aspx.cs:92
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
    System.Web.UI.Control.LoadRecursive() +71
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    This was definitely the right answer, I thought ODAC was already installed on the server, but apparently not. I installed the 64-bit OCAC XCopy version on the server and now it works.

  • Oracle.DataAccess.dll not loading in 64 - bit OS

    Hi All
    I have a console application that needs to be scheduled in task manager. My system is 32-bit operating system and I’m using Oracle.DataAccess.dll in my application to establish connection to the oracle db. The version is 2.112.1.0 and the processor architecture of this dll in C:\Windows\Assembly is x86. In my local m/c this dll works fine with all 3 build and target platforms – x64, x86 or AnyCPU. But when I copy the files to my staging server which is a 64-bit OS I’m getting the following exception. (Note: I’m also having Oracle.DataAccess version 10.2.0.100 which is also x86 available in C:\Windows\Assembly)
    System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    File name: 'Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' at
    Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
    Running under executable D:\ProjectFolder\MyExecutable.exe
    Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
    Running under executable D:\ ProjectFolder\MyExecutable.exe
    --- A detailed error log follows.
    === Pre-bind state information ===
    LOG: User = UserId
    LOG: DisplayName = Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342
    (Fully-specified)
    LOG: Appbase = file:///D:/ ProjectFolder/
    LOG: Initial PrivatePath = NULL
    Calling assembly : MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: D:\ ProjectFolder\MyExecutable.exe.Config
    LOG: Using host configuration file:
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
    LOG: Post-policy reference: Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342
    LOG: Attempting download of new URL file:///D:/ ProjectFolder/ Oracle.DataAccess.DLL.
    ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
    I have tried to build the application to target AnyCPU / x64 / x86. It fails in all 3 scenarios.
    There are other applications in the staging server where Oracle connection can be established. So ODP.Net should be registered in the server. So looks like problem with my console app. Does anyone have any idea what could be the problem?
    Thanks & Regards,
    Sree

    If I'm reading your post correctly, your application is built using ODP.net 2.112.1.0 (an 11gR2 client) and your other system has 10.2.0.100 (a 10g client).
    That's your problem. When .net tries to load the assembly, it looks for 2.112.1.0. Policy files that get installed when you install the client would allow it to use a newer version instead (like 2.112.3.0), but not to use an older version. So .net doesn't think you have a compatible Oracle client installed.
    You could manually add assembly binding redirects to force it to load 10.2.0.100, but I really don't recommend that given some differences between 10g and 11g (I tried that once and had some weird problems). You could also build the application using 10.2.0.100 instead.
    The best fix for this is to install 2.112.1.0 on the other system, or try out the managed client when it's out of beta (which doesn't need to be installed at all).

  • 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

    Server Error in '/' Application.
    Configuration Error 
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
    Parser Error Message: 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.
    Source Error: 
    Line 31: <compilation debug="true">
    Line 32: <assemblies>
    Line 33: <add assembly="Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89B483F429C47342" />
    Line 34: <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    Line 35: <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    Source File: D:\AverySignatureBinders\httpsdocs\ASBNet\web.config    Line: 33 
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342' could not be loaded.
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    For Adapter Pack 2013 the following Oracle Client(s) are needed:
    Supported client versions: Oracle Data Access Components for Oracle Client 12.1, Oracle Data Access Components for Oracle Client 11.2.0.1
    And please bear in mind that both the 32- and 64 bit versions are needed.
    Morten la Cour

  • Unable to cast object of type 'Oracle.DataAccess.Types.OracleDecimal'......

    I have some Oracle Tables with sequences for primary key and stored procs in packages to wrap up the insert commands. The sequences field are all declared as NUMBER.
    I also have Datasets based on the tables and a DataAdapter for each package. The Datasets see the primary keys as System.Decimal. The DataAdapter sees the output primary key parameter to the stored procs as OracleDecimal.
    tmp.Parameters.Add(new OracleParameter("P_ID", Oracle.DataAccess.Client.OracleDbType.Decimal, ParameterDirection.Output));
    tmp.Parameters["P_ID"].SourceColumn = "ID";
    When I call the Update on the DataAdapter the update happens on the DB and then I get the following error
    System.ArgumentException : Unable to cast object of type 'Oracle.DataAccess.Types.OracleDecimal' to type 'System.IConvertible'.Couldn't store <231> in ID Column. Expected type is Decimal.
    ----> System.InvalidCastException : Unable to cast object of type 'Oracle.DataAccess.Types.OracleDecimal' to type 'System.IConvertible'.
    If I change the Oracle parameter to Oracle.DataAccess.Client.OracleDbType.Int32 or Oracle.DataAccess.Client.OracleDbType.Int64 it works fine - any ideas why that would be ? I would expect System.Decimal to map to Oracle.DataAccess.Types.OracleDecimal.

    Hi,
    If I change the Oracle parameter to Oracle.DataAccess.Client.OracleDbType.Int32 or Oracle.DataAccess.Client.OracleDbType.Int64 it works fine - any ideas why that would be ? I would expect System.Decimal to map to Oracle.DataAccess.Types.OracleDecimal.
    I'm trying to do the same, but no matter what I do, I get the OracleDecimal error. Parameter is defined as:
    bq. this._adapter.InsertCommand = new global::Oracle.DataAccess.Client.OracleCommand(); \\ this._adapter.InsertCommand.Connection = this.Connection; \\ this._adapter.InsertCommand.CommandText = "INSERT INTO PERSON\r\n                      (ID, SURNAME, NAME, BIRTHCITY, EMSO)\r\nV" + \\ +"ALUES (:ID, :SURNAME, :NAME, :BIRTHCITY, :EMSO) RETURNING ID INTO :ID";+ \\ this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; \\ param = new global::Oracle.DataAccess.Client.OracleParameter(); \\ param.ParameterName = "ID"; \\ param.DbType = global::System.Data.DbType.Int32; \\ param.OracleDbType = global::Oracle.DataAccess.Client.OracleDbType.Int32; \\ param.Direction = global::System.Data.ParameterDirection.Output; \\ param.IsNullable = true; \\ param.SourceColumn = "ID"; \\ this._adapter.InsertCommand.Parameters.Add(param);
    But no luck...

  • Could not load file or assembly 'Oracle.DataAccess' Windows Vista x64

    Ok now here is the funny part, this works fine when i'm developing ASP.NET applications ( i assume that is puts the dev web server into x86 mode), but when im trying to use Oracle.DataAccess DLL in a console application i get a '+Additional information: Could not load file or assembly 'Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.+' error in visual studio when i try and debug and also when i try and run the console app.
    Using the latest ODP.NET 11.1.0.6.20, Windows Vista x64 SP1 (all updates installed), Visual Studio 2008 SP1

    never mind, figured it out, the Platform target in studio was on "Auto" and was defaulting to x64....

  • VS2008 - Could not load file or assembly 'Oracle.DataAccess...

    Hi all,
    After installing the ODAC 11g I am getting the following error when I try to run in debug mode a VS 2008 Win Form app that uses DataAccess.dll. The app is the HR_Connect.
    Here is the error -
    System.IO.FileNotFoundException was unhandled
    Message="Could not load file or assembly 'Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified."
    Source="HR_Connect"
    FileName="Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342"
    Do I need to install ODT as well?
    I thought I found the answer to my problem in another thread but alas the below does not help. After installing the ODAC 11g the file mentioned below is in both places already so nothing to move.
    Here is the reply.
    We believe we have found the solution to the package load failure errors in ODT 11g.
    Assuming that you received no errors or warnings during the installation, try the following:
    After installing ODAC 11g on a machine with Visual Studio 2005 and/or Visual Studio 2008:
    1) Close Visual Studio
    2) Copy over the MSVCR71.dll from%ORACLE_HOME%\oui\lib\win32 to %ORACLE_HOME%
    ..where %ORACLE_HOME% would be the directory where you installed ODAC 11g, for example C:\app\user1\product\11.1.0\client_1
    3) Restart Visual Studio, and attempt to use ODT.
    Please let me know if this fixes your problem!Thanks

    Hi the solution you posted is for "Package Load Failure" errors with Visual Studio. It doesn't sound like you are receiving that error, so that solution does not apply to you.
    Some suggestions:
    1) Repost this to ODP.NET forum. They likely have seen this before.
    2) Make sure when you are doing the install of ODAC that you are not getting any warnings or errors. If you are, make sure not to proceed, and instead resolve those install errors first.

  • Could not load file or assembly Oracle.DataAccess

    Hi, I have a web project in Visual Studio 2008 for .NET Framework 3.5 using ODP.NET. The app has been working under a 32bit machine with the 10.2 client for a few years. We are moving to new servers which are 64bit and require the 11.2 client. I am trying to get the project built and running on my laptop but it fails at the build. I have a 64bit laptop (Windows 7) and have installed the Oracle 11.2 64 bit client. I have confirmed in the c:\windows\assembly that the Oracle.DataAccess.dll says it is AMD64. However, when I try to build my project it says:
    Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b473f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format
    From the many posts I have read this happens when you are mixing 64bit and 32bit but from everything I see, all my stuff is 64bit and it should be ok. I can say I have uninstalled and reinstalled the client a few times but I think it's ok as I can connect to the database through sqlplus ok.
    Any ideas?
    Edited by: user6726317 on Aug 20, 2012 5:27 PM

    As has been mentioned, this problem is caused by conflicting 64/32 bit issues where you try to load the wrong type of assembly.
    In this case, since the project already was 32 bit I'd recommend you simply install the 32 bit version of ODP.net. This installs alongside the 64 bit one, and will let you run the application in 32 bit mode (which it was designed for). Make sure to change the build settings to x86 in Visual Studio.
    edit - For a web project, it'll either debug inside IIS or the Visual Studio development server, depending on how you have it configured in Visual Studio. I believe the development server is 32 bit like VS itself. IIS is 64, but an application pool can be configured to enable 32 bit applications. Either way, I wouldn't try changing the application from 32 bit to 64 bit without a good reason. Just run it as 32 bit with the 32 bit version of ODP.net 11.2.
    Edited by: Tridus on Aug 24, 2012 9:41 AM

  • Could not load file or assembly 'Oracle.DataAccess, Version=2.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.

    Hi All,
    While trying to access oracle database from SharePoint facing "Could not load file or assembly 'Oracle.DataAccess, Version=2.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified."
    How to fix this issue?  Thanks in advance!

    Hi,
    According to your post, my understanding is that you get error while access oracle database in SharePoint.
    You can set “Enable 32-bit Applications” to true in the application pool for the web application, then check whether it works.
    For more information:
    https://www.learningpenguin.net/myblog/2014/02/03/could-not-load-file-or-assembly-oracle-dataaccess-or-one-of-its-dependencies-an-attempt-was-made-to-load-a-program-with-an-incorrect-format/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

Maybe you are looking for