FIX: Receive location restarts when you use the WCF-SQL adapter or the WCF-Oracle adapter in BizTalk Adapter Pack

Article translations Article translations
Article ID: 2552439
Expand all | Collapse all

On This Page

This article applies to the following product:
  • BizTalk Adapter Pack 2.0
  • BizTalk Adapter Pack 2010

SYMPTOMS

When you use one of the following adapters that are included in Microsoft BizTalk Adapter Pack 2.0 or in Microsoft BizTalk Adapter Pack 2010 on a receive location, the receive location restarts unexpectedly:
  • The Windows Communication Foundation (WCF)-SQL adapter
  • The WCF-Oracle adapter

Additionally, BizTalk Server may encounter the ConnectionException exception, and then the BizTalk server may restart after one of the following warnings is logged in the Application log.

WCF-SQL adapter

Warning 1
"The adapter ""WCF-SQL"" raised an error message. Details ""System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Transaction'.
at System.Transactions.Transaction.Rollback(Exception e)
at Microsoft.Adapters.Sql.SqlAdapterInboundHandler.TryReceive(TimeSpan timeout, Message& message, IInboundReply& reply)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterInputChannel.TryReceive(TimeSpan timeout, Message& message)
at System.ServiceModel.Dispatcher.InputChannelBinder.TryReceive(TimeSpan timeout, RequestContext& requestContext)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.TryReceive(TimeSpan timeout, RequestContext& requestContext)""."
Warning 2
"The adapter ""WCF-SQL"" raised an error message. Details ""System.TimeoutException: Exception of type 'System.TimeoutException' was thrown.
at Microsoft.Adapters.AdapterUtilities.TimeoutHelper.GetRemainingTimeoutAndThrowDefaultExceptionMessageIfExpired()
at Microsoft.Adapters.Sql.ExecutionHelper.ExecuteScalar(SqlCommand sqlCommand, TimeoutHelper timeoutHelper)
at Microsoft.Adapters.Sql.SqlAdapterInboundHandler.Polling_WaitForMessage(TimeoutHelper timeoutHelper)
at Microsoft.Adapters.Sql.SqlAdapterInboundHandler.WaitForMessage(TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterInputChannel.WaitForMessage(TimeSpan timeout)
at System.ServiceModel.Dispatcher.InputChannelBinder.WaitForMessage(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.WaitForMessage()""."

WCF-Oracle adapter

Warning 1
The adapter "WCF-Oracle" raised an error message. Details "Microsoft.ServiceModel.Channels.Common.ConnectionException: The timeout "00:02:00" expired while executing the function "WaitForMessage". ---> System.TimeoutException: The timeout "00:02:00" expired while executing the function "WaitForMessage".
at Microsoft.Adapters.AdapterUtilities.TimeoutHelper.GetRemainingTimeoutAndThrowDefaultExceptionMessageIfExpired()
at Microsoft.Adapters.OracleCommon.OracleCommonUtils.SetCommandTimeout(OracleCommand command, TimeoutHelper timeoutHelper)
at Microsoft.Adapters.OracleCommon.OracleCommonUtils.ExecuteNonQuery(OracleCommand command, OracleCommonExecutionHelper executionHelper)
at Microsoft.Adapters.OracleDB.OracleDBConnection.OpenConnection(OracleCommonExecutionHelper executionHelper)
--- End of inner exception stack trace ---
at Microsoft.Adapters.OracleDB.OracleDBConnection.OpenConnection(OracleCommonExecutionHelper executionHelper)
at Microsoft.Adapters.OracleDB.OracleDBInboundContract.Polling_WaitForMessage(OracleCommonExecutionHelper executionHelper)
at Microsoft.Adapters.OracleDB.OracleDBInboundContract.WaitForMessage(TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterInputChannel.WaitForMessage(TimeSpan timeout)
at System.ServiceModel.Dispatcher.InputChannelBinder.WaitForMessage(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.WaitForMessage()".
Warning 2
The adapter "WCF-Oracle" raised an error message. Details "System.TimeoutException: The timeout "00:02:00" expired while executing the function "WaitForMessage".
at Microsoft.Adapters.AdapterUtilities.TimeoutHelper.GetRemainingTimeoutAndThrowDefaultExceptionMessageIfExpired()
at Microsoft.Adapters.OracleCommon.OracleCommonUtils.SetCommandTimeout(OracleCommand command, TimeoutHelper timeoutHelper)
at Microsoft.Adapters.OracleCommon.OracleCommonUtils.ExecuteScalar(OracleCommand command, OracleCommonExecutionHelper executionHelper)
at Microsoft.Adapters.OracleDB.OracleDBInboundContract.Polling_WaitForMessage(OracleCommonExecutionHelper executionHelper, OracleCommonConnectionWrapper connection)
at Microsoft.Adapters.OracleDB.OracleDBInboundContract.Polling_WaitForMessage(OracleCommonExecutionHelper executionHelper)
at Microsoft.Adapters.OracleDB.OracleDBInboundContract.WaitForMessage(TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterInputChannel.WaitForMessage(TimeSpan timeout)
at System.ServiceModel.Dispatcher.InputChannelBinder.WaitForMessage(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.WaitForMessage()".

CAUSE

This issue occurs because the receive location restarts unexpectedly when the WaitForMessage method generates a TimeoutException exception.

When the WaitForMessage method generates a TimeoutException exception, the TryReceive method is called, and then the WCF-SQL adapter or the WCF-Oracle adapter rolls back the transaction. However, the rollback operation may generate an ObjectDisposedException exception. Therefore, one of the warnings that are mentioned in the "Symptoms" section is generated.

RESOLUTION

Cumulative update information

For BizTalk Adapter Pack 2010

The hotfix that resolves this issue is included in cumulative update package 2 for BizTalk Adapter Pack 2010. For more information about how to obtain this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:

2572999Cumulative update package 2 for BizTalk Adapter Pack 2010

For BizTalk Adapter Pack 2.0

The hotfix that resolves this issue is included in cumulative update package 3 for BizTalk Adapter Pack 2.0.

For more information about how to obtain the cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2557150 Cumulative update package 3 for BizTalk Adapter Pack 2.0

Note This hotfix adds the <TraceIdentifier> and </TraceIdentifier> tags that are required in the WCF tracing file (.svcLog). After the hotfix adds these tags, the output in the trace files is corrected, and Service Trace Viewer Tool (SvcTraceViewer.exe) opens large WCF tracing files more quickly.

The following ::Exit traces lack the <TraceIdentifier> and </TraceIdentifier> tags before you apply this hotfix:

<Description>ExecuteNonQuery::Exit</Description>

<Description>OpenConnection::Exit</Description>

<Description>ExecuteScalar::Exit</Description>

<Description>Polling_WaitForMessage::Exit</Description>

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about the IInputChannel.WaitForMessage method, visit the following MSDN website:

General information about the IInputChannel.WaitForMessage method
For more information about the IInputChannel.TryReceive method, visit the following MSDN website:
General information about the IInputChannel.TryReceive method
For more information about BizTalk Server hotfixes, click the following article number to view the article in the Microsoft Knowledge Base:
2003907 Information about BizTalk Server hotfixes

Properties

Article ID: 2552439 - Last Review: September 1, 2011 - Revision: 3.0
Keywords: 
kbqfe kbfix kbbtsadapters kbsurveynew kbexpertiseadvanced KB2552439

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com