I'm working on a clean BizTalk 2020 install (with Cumulative Update 4). I installed the Oracle Client 19c (both 32-bit and 64-bit). According to a white paper from Sandro Pereira this is the highest supported version.
I've read this StackOverflow, but not sure I understand the answer. There also a comment there about install Oracle 12c client first.
I've installed BizTalk 2020 and testing various features we use. When I ran an orchestration that retrieves data from Oracle, I get the error below:
A message sent to adapter "WCF-Custom" on send port "TestProject.EBSSendReceivePort_WCF-Oracle" with URI "oracledb://ServerABC/" is suspended.
Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Oracle.DataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
File name: 'Oracle.DataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342'
at Microsoft.Adapters.OracleDB.OracleDBBinding.Initialize()
at Microsoft.Adapters.OracleDB.OracleDBBinding.CreateBindingElements()
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.InitializeValues(IBaseMessage message)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2..ctor(IBaseMessage message, WcfTransmitter`2 transmitter)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfTransmitter`2.GetClientFromCache(String spid, IBaseMessage message)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfAsyncBatch`2.BatchWorker(List`1 messages)
I followed these steps - copy of HAJJAJ' answer from here:
Register the Oracle.DataAccess.dll assembly You must register the Oracle.DataAccess.dll assembly to the Global Assembly Cache (GAC) for .NET version 2 and version 4:
Open a command prompt as an Administrator.
Navigate to %ORACLE_CLIENT_HOME%\ODP.NET\bin\2.x.
Execute the following command:: oraprovcfg.exe/action:gac/providerpath:Oracle.DataAccess.dll
Navigate to %ORACLE_CLIENT_HOME%\ODP.NET\bin\4.x.
Execute the following command: oraprovcfg.exe/action:gac/providerpath:Oracle.DataAccess.dll
After that I see these two files: c:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.DataAccess\v4.0_4.122.19.1__89b483f429c47342\oracle.dataaccess.dll and c:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess\v4.0_4.122.19.1__89b483f429c47342\oracle.dataaccess.dll
(and nothing in GAC_MSIL)
I have tried the following redirect. Since the error refers to 4.122.18.3, I tried mapping it to the numbers from the above GAC (4.122.19.1). I noticed that the last two digits, 18.3 and 19.1 are versions of the Oracle Client (18c and 19a? respectively). I'm not sure why it's 19.1 and not 19.3.
When I ran the setup, it clearly said 19c:
In Sandro Pereira's white paper, he demonstrates with 12c, but suggests that 18c and 19c are valid.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" />
<bindingRedirect oldVersion="4.122.18.3" newVersion="4.122.19.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
I've been trying many things last 2-3 days, and I appreciate any ideas.
Update 1: Just after posting, I noticed something wrong with my redirect, and changed 2.122 to 4.122.
Current running SendPort in 32 bit host, then I will try with 64-bit after I get this working.
By the way, with the redirect the error is slightly different:
A message sent to adapter "WCF-Custom" on send port "TestProject.EBSSendReceivePort_WCF-Oracle" with URI "oracledb://EBZSND2/" is suspended.
Error details: System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---> System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for oracle.dataaccess.client: Could not load file or assembly 'System.Data, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified. (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config line 14) ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Data, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
UPDATE 1
I wrote a C# console program in VS2019 (.NET Framework 4.7.2).
OracleConnection conn = new OracleConnection(oraDbStr);
ConfigurationErrorsException: An error occurred creating the configuration section handler for oracle.dataaccess.client: Could not load file or assembly 'System.Data, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config line 15)
I had the "prefer 32 bit" build option not selected, to force 64-bit.
This is that part of my machine.config where the XML comment is line 14, and the 4.122.19.1 is line 15. I have tried both the 4.122.18.3 and the 4.122.19.1. As mentioned above, it is 4.122.19.1 that is in this directory: 'c:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.DataAccess\v4.0_4.122.19.1__89b483f429c47342\oracle.dataaccess.dll' and note - this is the file that I did the "Add reference" to in the C# program.
<configuration>
<configSections>
<!-- <section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342" />-->
<section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" restartOnExternalChanges="false" requirePermission="false" />