Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ESB Toolkit BRE Itinerary Resolver Fails with Exception


View products that this article applies to.

Symptoms

The following exception is thrown with ESB 2.2 on Microsoft BizTalk Server 2013 when the ItinerarySelectReceiveXML receive pipeline is used to call the Business Rules Engine to dynamically select an itinerary (using the ESB BRI Resolver).


Exception has been thrown by the target of an invocation.

Source: Microsoft.Practices.ESB.Resolver.ResolverMgr

Method: System.Collections.Generic.Dictionary`2[System.String,System.String] Resolve(Microsoft.Practices.ESB.Resolver.ResolverInfo, Microsoft.BizTalk.Message.Interop.IBaseMessage, Microsoft.BizTalk.Component.Interop.IPipelineContext)

Error Source: mscorlib

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

Error StackTrace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.Practices.ESB.Resolver.ResolverFactory.Create(String key)
at Microsoft.Practices.ESB.Resolver.ResolverMgr.GetResolver(ResolverInfo info)
at Microsoft.Practices.ESB.Resolver.ResolverMgr.Resolve(ResolverInfo info, IBaseMessage message, IPipelineContext pipelineContext)


↑ Back to the top


Cause

ESB Toolkit 2.2 uses Unity 2.0 which requires modifications to the esb.config file.

↑ Back to the top


Resolution

You have to update the esb.config file to resolve this issue. To do this, save a backup copy of the original esb.config (default location is C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit) before making any of the following changes. Note that esb.config file changes will require a recycle of the process that is using ESB.

Manually modify the existing esb.config file as follows:
  1. Remove the <typeConfig> element
  2. Change the <typeAlias> element to <alias>
  3. Change the <type> element to <register>
  4. Remove the <containers> elements
  5. Remove the <types> elements
  6. Remove the <typeAliases> elements
  7. Remove the parameterType attribute of the <param> elements.
  8. Remove the type attribute of the <value> element within <param name="overrideExistingItinerary">
All of the above changes take place within the <esb.resolver> section of the esb.config file. Below is the <esb.resolver> section with all of the above changes already implemented.

  <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>

↑ Back to the top


More Information

↑ Back to the top


Keywords: kbbts, kbqfe, kbfix, kbsurveynew, kbexpertiseadvanced, kb

↑ Back to the top

Article Info
Article ID : 2887594
Revision : 1
Created on : 1/7/2017
Published on : 11/4/2013
Exists online : False
Views : 307