BizTalk WCF-ORACLEDB Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client

I’m back to one of my favorite topics, error, warnings, cause, and solutions blog post – still have plenty of them in my backlog to be published. I recently installed a new BizTalk Server solution in production in one of my clients that integrate with ORACLE. When I try to activate the Oracle Receive ports, I got the following error inside Event Viewer: 

The Messaging Engine failed to add a receive location “ORACLE_RECEIVE_LOCATION_NAME” with URL “oracledb://SERVER_ADDRESS:PORT_NUMBER/SERVICE_NAME/Dedicated?PollingId=polling_id” to the adapter “WCF-Custom”. Reason: “System.TypeInitializationException: The type initializer for ‘Oracle.DataAccess.Client.OracleConnection’ threw an exception. —> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
 at Oracle.DataAccess.Client.OracleInit.Initialize()
   at Oracle.DataAccess.Client.OracleConnection..cctor()
   — End of inner exception stack trace —
   at Oracle.DataAccess.Client.OracleConnection..ctor()
   at Microsoft.Adapters.OracleDB.OracleDBBinding.Initialize()
   at Microsoft.Adapters.OracleDB.OracleDBBinding.CreateBindingElements()
   at System.ServiceModel.Channels.CustomBinding.SafeCreateBindingElements(Binding binding)
   at System.ServiceModel.Channels.Binding.CanBuildChannelListener[TChannel](BindingParameterCollection parameters)
 at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfUtils.IsQueuedReceive(Binding binding)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.BtsServiceHostBase.InitializeRuntime()
   at System.ServiceModel.ServiceHostBase.OnBeginOpen()
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint.Enable()
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint..ctor(BizTalkEndpointContext endpointContext, IBTTransportProxy transportProxy, ControlledTermination control)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiver`2.AddReceiveEndpoint(String url, IPropertyBag adapterConfig, IPropertyBag bizTalkConfig)”.

The provider is not compatible with the version of Oracle client

Followed by the following error:

The receive location “ORACLE_RECEIVE_LOCATION_NAME” with URL “oracledb://SERVER_ADDRESS:PORT_NUMBER/SERVICE_NAME/Dedicated?PollingId=polling_id” is shutting down. Details:”The Messaging Engine failed while notifying an adapter of its configuration. “.

The Messaging Engine failed while notifying an adapter of its configuration

Of course, these two errors are related, but the first one is the one that has more precise information regarding what is happening.

Cause

Usually, these types of problems occur when you don’t have the correct versions of the Oracle Data Provider for .NET (ODP.NET) and the Oracle client, which are part of the Oracle Data Access Components (ODAC). Still, it may occur, or similar errors, for other several reasons like for example:

  • The Oracle Data Provider DLLs are not properly registered into GAC.
  • Mistmach installation versions between the components, for example between Oracle Client and ODP.NET.
  • Mistmach installation versions between 32bit or 64bit ODAC components.

Unfortunately, kind of, none of the above reasons were justifying my issues since I already had several ORACLE receive locations, running with success on the environment.

When I investigate the other running ports, I realized that all of them were running the 64-bit Host Instance. And this one that was getting problems was running in 32-bit Receive Host Instance. I then realize that ODAC 32-bit components were not properly installed in production.

Even if you don’t use it, it is essential to have always the 32, and 64-bit of each adapter installed correctly in your environment. If that’s not possible, make sure to associate the 32, and 64-bit Receive Handlers and Send Handlers for each adapter accordingly.

Solution

In my case, the solution was simple, since I had already several ORACLE receive location successfully running in the environment. I have to access the receive location and configure the Receive Handler to be the 64-bit Host Instance.

After this modification, the problem was gone, and I could pull data from the ORACLE database. Otherwise, make sure to install the necessary 32-bit or 64-bit ODAC components correctly.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

BizTalk360
BizTalk Server

Over 500+ customers across
30+ countries depend on BizTalk360

Learn More
Serverless360
Azure

Manage and monitor serverless
components effortlessly

Learn More
Atomicscope
Business Users

Monitor your Business Activity in iPaaS
or Hybrid integration solutions

Learn More

Back to Top