本文适用于以下产品:
- BizTalk Adapter Pack 2.0
- BizTalk Adapter Pack 2010
症状
在接收位置使用 Microsoft BizTalk Adapter Pack 2.0 或 Microsoft BizTalk Adapter Pack 2010 中包含的以下适配器时,接收位置意外重启:
- Windows Communication Foundation (WCF) -SQL 适配器
- WCF-Oracle 适配器
此外,BizTalk Server 可能会遇到 ConnectionException 异常,然后在应用程序日志中记录以下警告之一后,BizTalk Server 可能会重启。
WCF-SQL 适配器
警告 1
注意
“适配器 ”“WCF-SQL”“ 引发了错误消息。 详细信息 “”System.ObjectDisposedException: 无法访问已释放的对象。
对象名称:“Transaction”。
at System.Transactions.Transaction.Rollback (Exception e)
在 Microsoft.Adapters.Sql.SqlAdapterInboundHandler.TryReceive (TimeSpan timeout, Message& message, IInboundReply& reply)
在 Microsoft.ServiceModel.Channels.Common.Channels.AdapterInputChannel.TryReceive 时 (TimeSpan 超时,消息& 消息)
在 System.ServiceModel.Dispatcher.InputChannelBinder.TryReceive (TimeSpan 超时,RequestContext& requestContext)
在 System.ServiceModel.Dispatcher.ErrorHandlingReceiver.TryReceive (TimeSpan 超时,RequestContext& requestContext) “”.”
警告 2
注意
“适配器 ”“WCF-SQL”“ 引发了错误消息。 详细信息 “”System.TimeoutException: 引发了类型为 'System.TimeoutException' 的异常。
在 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 超时)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterInputChannel.WaitForMessage (TimeSpan 超时)
在 System.ServiceModel.Dispatcher.InputChannelBinder.WaitForMessage 处 (TimeSpan 超时)
在 System.ServiceModel.Dispatcher.ErrorHandlingReceiver.WaitForMessage () “”.”
WCF-Oracle 适配器
警告 1
注意
适配器 “WCF-Oracle” 引发了错误消息。 详细信息 “Microsoft.ServiceModel.Channels.Common.ConnectionException: 执行函数 ”WaitForMessage“ 时超时 ”00:02:00“ 已过期。 ---> System.TimeoutException:执行函数“WaitForMessage”时超时“00:02:00”已过期。
在 Microsoft.Adapters.AdapterUtilities.TimeoutHelper.GetRemainingTimeoutAndThrowDefaultExceptionMessageIfExpired ()
在 Microsoft.Adapters.OracleCommon.OracleCommonUtils.SetCommandTimeout (OracleCommand 命令,TimeoutHelper timeoutHelper)
在 Microsoft.Adapters.OracleCommon.OracleCommonUtils.ExecuteNonQuery (OracleCommand 命令、OracleCommonExecutionHelper executionHelper)
在 Microsoft.Adapters.OracleDB.OracleDBConnection.OpenConnection (OracleCommonExecutionHelper executionHelper)
- 内部异常堆栈跟踪结束 -
在 Microsoft.Adapters.OracleDB.OracleDBConnection.OpenConnection (OracleCommonExecutionHelper executionHelper)
在 Microsoft.Adapters.OracleDB.OracleDBInboundContract.Polling_WaitForMessage (OracleCommonExecutionHelper executionHelper)
at Microsoft.Adapters.OracleDB.OracleDBInboundContract.WaitForMessage (TimeSpan 超时)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterInputChannel.WaitForMessage (TimeSpan 超时)
在 System.ServiceModel.Dispatcher.InputChannelBinder.WaitForMessage 处 (TimeSpan 超时)
在 System.ServiceModel.Dispatcher.ErrorHandlingReceiver.WaitForMessage () “。
警告 2
注意
适配器 “WCF-Oracle” 引发了错误消息。 详细信息 “System.TimeoutException:执行函数 ”WaitForMessage“ 时超时 ”00:02:00“ 已过期。
在 Microsoft.Adapters.AdapterUtilities.TimeoutHelper.GetRemainingTimeoutAndThrowDefaultExceptionMessageIfExpired ()
在 Microsoft.Adapters.OracleCommon.OracleCommonUtils.SetCommandTimeout (OracleCommand 命令,TimeoutHelper timeoutHelper)
在 Microsoft.Adapters.OracleCommon.OracleCommonUtils.ExecuteScalar (OracleCommand 命令、OracleCommonExecutionHelper executionHelper)
在 Microsoft.Adapters.OracleDB.OracleDBInboundContract.Polling_WaitForMessage (OracleCommonExecutionHelper executionHelper, OracleCommonConnectionWrapper 连接)
在 Microsoft.Adapters.OracleDB.OracleDBInboundContract.Polling_WaitForMessage (OracleCommonExecutionHelper executionHelper)
at Microsoft.Adapters.OracleDB.OracleDBInboundContract.WaitForMessage (TimeSpan 超时)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterInputChannel.WaitForMessage (TimeSpan 超时)
在 System.ServiceModel.Dispatcher.InputChannelBinder.WaitForMessage 处 (TimeSpan 超时)
在 System.ServiceModel.Dispatcher.ErrorHandlingReceiver.WaitForMessage () “。
原因
出现此问题的原因是,当 WaitForMessage 方法生成 TimeoutException 异常时,接收位置意外重启。
当 WaitForMessage 方法生成 TimeoutException 异常时,将调用 TryReceive 方法,然后 WCF-SQL 适配器或 WCF-Oracle 适配器回滚事务。 但是,回滚操作可能会生成 ObjectDisposedException 异常。 因此,将生成“症状”部分中提到的警告之一。
解决方法
累积更新信息
对于 BizTalk Adapter Pack 2010
解决此问题的修补程序包含在 BizTalk Adapter Pack 2010 的累积更新包 2 中。 有关如何获取此累积更新包的更多信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:
2572999 适用于 BizTalk Adapter Pack 2010 的累积更新程序包 2
对于 BizTalk Adapter Pack 2.0
解决此问题的修补程序包含在 BizTalk Adapter Pack 2.0 的累积更新程序包 3 中。
有关如何获取累积更新包的更多信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:
2557150 适用于 BizTalk Adapter Pack 2.0 的累积更新包 3
注意:此修补程序添加了 <WCF 跟踪文件 (.svcLog) 中所需的 TraceIdentifier> 和 </TraceIdentifier> 标记。 修补程序添加这些标记后,跟踪文件中的输出将得到更正,并且服务跟踪查看器工具 (SvcTraceViewer.exe) 可以更快地打开大型 WCF 跟踪文件。
在应用此修补程序之前,以下 ::Exit 跟踪缺少 <TraceIdentifier> 和 </TraceIdentifier> 标记:
<说明>ExecuteNonQuery::Exit</Description>
<说明>OpenConnection::Exit</Description>
<说明>ExecuteScalar::Exit</Description>
<说明>Polling_WaitForMessage::Exit</Description>
状态
Microsoft 已确认在 "适用于" 部分中所列的 Microsoft 产品中存在问题。
详细信息
有关 IInputChannel.WaitForMessage 方法的详细信息,请访问以下 MSDN 网站:
有关 IInputChannel.WaitForMessage 方法的一般信息 有关 IInputChannel.TryReceive 方法的详细信息,请访问以下 MSDN 网站:
有关 IInputChannel.TryReceive 方法的一般信息有关 BizTalk Server 修补程序的更多信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:
2003907 有关BizTalk Server修补程序的信息