狀況

下列的例外狀況時擲回的 ESB 2.2 在 Microsoft BizTalk Server 2013年 ItinerarySelectReceiveXML 接收管線用來呼叫商務規則引擎,以動態方式選取 (使用 「 ESB BRI 解決器 」) 的路線。


引動過程的目標擲回例外狀況。

來源︰ Microsoft.Practices.ESB.Resolver.ResolverMgr

方法︰ System.Collections.Generic.Dictionary'2[System.String,System.String] 解決 (Microsoft.Practices.ESB.Resolver.ResolverInfo,Microsoft.BizTalk.Message.Interop.IBaseMessage,Microsoft.BizTalk.Component.Interop.IPipelineContext)

錯誤來源︰ mscorlib

錯誤 TargetSite: System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)

錯誤 StackTrace︰ 在 System.RuntimeMethodHandle.InvokeMethod (物件目標、 物件 [] 引數、 簽章的簽章,則為 True 的建構函式)
在 System.Reflection.RuntimeConstructorInfo.Invoke (BindingFlags invokeAttr、 繫結器繫結器、 物件 [] 參數、 CultureInfo 文化特性)
在 System.RuntimeType.CreateInstanceImpl (BindingFlags bindingAttr、 繫結器繫結器、 物件 [] 引數、 CultureInfo 文化特性、 物件 [] activationAttributes,StackCrawlMark 和 stackMark)
在 System.Activator.CreateInstance (型別型別、 BindingFlags bindingAttr、 繫結器繫結器、 物件 [] 引數、 CultureInfo 文化特性、 物件 [] activationAttributes)
在 System.Activator.CreateInstance (型別型別、 物件 [] 引數)
在 Microsoft.Practices.ESB.Resolver.ResolverFactory.Create (字串索引鍵)
在 Microsoft.Practices.ESB.Resolver.ResolverMgr.GetResolver (ResolverInfo 資訊)
在 Microsoft.Practices.ESB.Resolver.ResolverMgr.Resolve (ResolverInfo 資訊、 訊息 IBaseMessage、 IPipelineContext pipelineContext)



原因

ESB 工具組 2.2 使用凝聚力 2.0 需要修改 esb.config 檔案。

解決方案

您必須更新 esb.config 檔,以解決這個問題。若要執行這項操作,將儲存一份備份原始的 esb.config (預設位置會是 C:\Program 檔案 (x86) \Microsoft BizTalk ESB 工具組) 之前執行的下列變更。請注意,esb.config 檔案的變更將會需要回收的處理程序正在使用 ESB。

以手動方式修改現有的 esb.config 檔案,如下所示︰

  1. 移除 < typeConfig > 項目

  2. 變更至 < 別名 > < typeAlias > 項目

  3. 變更 < 註冊 > < 類型 > 項目

  4. 移除 < 容器 > 項目

  5. 移除 < 類型 > 項目

  6. 移除 < typeAliases > 項目

  7. 移除的 parameterType 屬性 < param > 項目。

  8. 移除 < 值 > 項目內的型別屬性 < param 名稱 ="overrideExistingItinerary">

所有上述的變更發生在 esb.config 檔案的 [< esb.resolver >] 區段內。以下是上述的變更已經實作的所有 < esb.resolver > 區段。

  <esb.resolver xmlns="http://schemas.microsoft.com/practices/2010/unity>">      <!-- Lifetime manager types -->
<alias alias="singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<!-- std type providers -->
<alias alias="string" type="System.String, mscorlib"/>
<alias alias="int" type="System.Int32, mscorlib"/>
<alias alias="bool" type="System.Boolean, mscorlib"/>
<!-- repository providers -->
<alias alias="IRepositoryProvider" type="Microsoft.Practices.ESB.Resolver.Itinerary.Facts.Repository.IRepositoryProvider, Microsoft.Practices.ESB.Resolver.Itinerary.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="SqlRepositoryProvider" type="Microsoft.Practices.ESB.Resolver.Itinerary.DataAccess.SqlRepositoryProvider, Microsoft.Practices.ESB.Resolver.Itinerary.DataAccess, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<!-- fact providers -->
<alias alias="IFactProvider" type="Microsoft.Practices.ESB.Resolver.Facts.IFactProvider, Microsoft.Practices.ESB.Resolver.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="IFactTranslator" type="Microsoft.Practices.ESB.Resolver.Facts.IFactTranslator, Microsoft.Practices.ESB.Resolver.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="ItineraryFactProvider" type="Microsoft.Practices.ESB.Resolver.Itinerary.Facts.ItineraryFactProvider, Microsoft.Practices.ESB.Resolver.Itinerary.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="ItineraryStaticFactProvider" type="Microsoft.Practices.ESB.Resolver.Itinerary.Facts.ItineraryStaticFactProvider, Microsoft.Practices.ESB.Resolver.Itinerary.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="ItineraryHeaderFactProvider" type="Microsoft.Practices.ESB.Resolver.Itinerary.Facts.ItineraryHeaderFactProvider, Microsoft.Practices.ESB.Resolver.Itinerary.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="ItineraryContentsFactProvider" type="Microsoft.Practices.ESB.Resolver.Itinerary.Facts.ItineraryContentsFactProvider, Microsoft.Practices.ESB.Resolver.Itinerary.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="ResolutionFactProvider" type="Microsoft.Practices.ESB.Resolver.Itinerary.Facts.ResolutionFactProvider, Microsoft.Practices.ESB.Resolver.Itinerary.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="DefaultFactTranslator" type="Microsoft.Practices.ESB.Resolver.Facts.DefaultFactTranslator, Microsoft.Practices.ESB.Resolver.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="ItineraryFactTranslator" type="Microsoft.Practices.ESB.Resolver.Itinerary.Facts.ItineraryFactTranslator, Microsoft.Practices.ESB.Resolver.Itinerary.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="ItineraryContentsFactTranslator" type="Microsoft.Practices.ESB.Resolver.Itinerary.Facts.ItineraryContentsFactTranslator, Microsoft.Practices.ESB.Resolver.Itinerary.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<!-- resolve providers -->
<alias alias="IResolveProvider" type="Microsoft.Practices.ESB.Resolver.IResolveProvider, Microsoft.Practices.ESB.Resolver, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<alias alias="ItineraryResolveProvider" type="Microsoft.Practices.ESB.Resolver.Itinerary.BREItineraryResolverContainer,Microsoft.Practices.ESB.Resolver.Itinerary, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "/>
<alias alias="StaticItineraryResolveProvider" type="Microsoft.Practices.ESB.Resolver.Itinerary.StaticItineraryResolveContainer,Microsoft.Practices.ESB.Resolver.Itinerary, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "/>
<!-- test containers -->
<container name="BRI">
<register type="IResolveProvider" mapTo="ItineraryResolveProvider" />
<register type="IFactProvider" mapTo="ItineraryFactProvider" name="ItineraryFactProvider">
<lifetime type="singleton" />
</register>
<register type="IRepositoryProvider" mapTo="SqlRepositoryProvider" name="CurrentRepositoryProvider">
<lifetime type="singleton" />
<constructor>
<param name="connectionStringName">
<value value="ItineraryDb"/>
</param>
<param name="cacheManagerName">
<value value="Itinerary Cache Manager"/>
</param>
<param name="cacheTimeout">
<value value="120" />
</param>
</constructor>
</register>
<register type="IFactTranslator" mapTo="DefaultFactTranslator" name="DefaultFactTranslator">
<lifetime type="singleton" />
</register>
<register type="IFactTranslator" mapTo="ItineraryFactTranslator" name="ItineraryFactTranslator">
<lifetime type="singleton" />
<constructor>
<param name="repositoryProvider">
<dependency name="CurrentRepositoryProvider"/>
</param>
</constructor>
</register>
</container>
<container name="ITINERARY">
<register type="IResolveProvider" mapTo="StaticItineraryResolveProvider" />
<register type="IRepositoryProvider" mapTo="SqlRepositoryProvider" name="CurrentRepositoryProvider">
<lifetime type="singleton" />
<constructor>
<param name="connectionStringName">
<value value="ItineraryDb"/>
</param>
<param name="cacheManagerName">
<value value="Itinerary Cache Manager"/>
</param>
<param name="cacheTimeout">
<value value="120" />
</param>
</constructor>
</register>
<register type="IFactProvider" mapTo="ResolutionFactProvider" name="ResolutionFactProvider" />
<register type="IFactProvider" mapTo="ItineraryHeaderFactProvider" name="HeaderFactProvider" />
<register type="IFactProvider" mapTo="ItineraryStaticFactProvider" name="StaticFactProvider" />
<register type="IFactProvider" mapTo="ItineraryContentsFactProvider" name="ItineraryContentsFactProvider" />
<register type="IFactTranslator" mapTo="DefaultFactTranslator" name="DefaultFactTranslator">
<lifetime type="singleton" />
</register>
<register type="IFactTranslator" mapTo="ItineraryFactTranslator" name="ItineraryFactTranslator">
<lifetime type="singleton" />
<constructor>
<param name="repositoryProvider">
<dependency name="CurrentRepositoryProvider"/>
</param>
</constructor>
</register>
<register type="IFactTranslator" mapTo="ItineraryContentsFactTranslator" name="ItineraryContentsFactTranslator">
<lifetime type="singleton" />
<constructor>
<param name="overrideExistingItinerary">
<value value="False"/>
</param>
</constructor>
</register>
</container>
</esb.resolver>


更多的資訊

尋找有關在凝聚力 2.0 http://msdn.microsoft.com/en-us/library/ff660914(v=pandp.20).aspx

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?

Thank you for your feedback!

×