BizTalk 2016 - WCF-Oracle adapter problem - exception raised while establishing connection,

442 Views Asked by At

I am in the process to migrate an old BTS 2006 application in BTS 2016. I have a problem with WCF-Oracle Adapter. When trying to connect the DB, it raises an exception. The problem occurs when I use the adapter for polling as well when I try to use it to read or update data; in few words, it's impossible to connect the Oracle DB with the adapter (connection with code is OK, so it's difficult to imagine an ODP problem).

I use BTS 2016, WS 2016, ODP 12.2.1.0 installed for 32 and 64 bits environment. I tried almost all changes possibles in adapters options with no results.

I suppose I missed a step but which one ?

Obvious problems have been all checked (TNSNames, port, user/password, etc ....)

Exception stack :

*The Messaging Engine failed to add a receive location "xxxx_Receive_Location" with URL "oracledb://XXXXXXX.****.net:1522/YYYYYY.****.net/Dedicated" to the adapter "WCF-OracleDB". Reason: "System.NullReferenceException: Object reference not set to an instance of an object.
   at Oracle.DataAccess.Client.OracleException.get_Number()
   at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable, OracleLogicalTransaction m_OracleLogicalTransaction)
   at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src, OracleLogicalTransaction m_oracleLogicalTransaction)
   at Oracle.DataAccess.Client.OracleConnectionOCP.Open(OracleConnection con)
   at Oracle.DataAccess.Client.OracleConnection.Open()
   at Microsoft.Adapters.OracleCommon.OracleCommonConnectionWrapper..ctor(String connectionString, OracleCommonExecutionHelper executionHelper)
   at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
   at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnection(Guid clientId, TimeSpan timeout)
   at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnectionHandler[TConnectionHandler](Guid clientId, TimeSpan timeout, MetadataLookup metadataLookup, String& connectionId)
   at Microsoft.ServiceModel.Channels.Common.Channels.AdapterChannelListener`1.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   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)".*
2

There are 2 best solutions below

0
On

Try setting up a Receive Location from scratch.

Previously we've had issues when migrating bindings between BizTalk versions, where they have introduced a new setting in the Adapter and not set a default. Creating the port from scratch will ensure that it will set it to some value. You can then compare the new binding to the old, and identify the culprit.

0
On

Problem solved after Oracle client installation and re-installion of ODP. It seems that the wcf-oracle adapter use unmanaged driver, and unmanaged driver needs Oracle client.