Upgrading to Commerce 13, could not get instance of ICartProvider

Vote:
 

Hi,

I was trying to upgrade from commerce 11.2.6 to 13.14.1.
I got the following error:


Failure while building 'Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Commerce.Order.ICartProvider,EPiServer.Commerce.Order.ICartProvider]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Commerce.Order.ICartProvider])._serviceLocator)', check the inner exception for details
1.) Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Commerce.Order.ICartProvider,EPiServer.Commerce.Order.ICartProvider]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Commerce.Order.ICartProvider])._serviceLocator)
2.) Instance of EPiServer.Commerce.Order.ICartProvider
3.) new DefaultOrderRepository(*Default of ICartProvider*, *Default of IPurchaseOrderProvider*, *Default of IPaymentPlanProvider*, *Default of ISynchronizedObjectInstanceCache*, *Default of DefaultOrderEvents*, *Default of ServiceCollectionAccessor<IOrderRepositoryCallback>*)
4.) EPiServer.Commerce.Order.Internal.DefaultOrderRepository
5.) Instance of EPiServer.Commerce.Order.IOrderRepository (EPiServer.Commerce.Order.Internal.DefaultOrderRepository)
6.) new ProfileMigrator(*Default of IOrderRepository*, *Default of ICurrentMarket*, *Default of CartMigrator*)
7.) EPiServer.Commerce.Order.ProfileMigrator
8.) Instance of EPiServer.Commerce.Order.IProfileMigrator (EPiServer.Commerce.Order.ProfileMigrator)
9.) Container.GetInstance(EPiServer.Commerce.Order.IProfileMigrator)

I coul'd find out what was wrong so i made another try, i enabled serialized carts and upgraded first to Commerce 12.17.2 which worked fine. I then tried to upgrade to Commerce 13.0.0. I got the same error:

Failure while building 'Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Commerce.Order.ICartProvider,EPiServer.Commerce.Order.ICartProvider]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Commerce.Order.ICartProvider])._serviceLocator)', check the inner exception for details
1.) Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Commerce.Order.ICartProvider,EPiServer.Commerce.Order.ICartProvider]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Commerce.Order.ICartProvider])._serviceLocator)
2.) Instance of EPiServer.Commerce.Order.ICartProvider
3.) new DefaultOrderRepository(*Default of ICartProvider*, *Default of IPurchaseOrderProvider*, *Default of IPaymentPlanProvider*, *Default of ISynchronizedObjectInstanceCache*, *Default of DefaultOrderEvents*, *Default of ServiceCollectionAccessor<IOrderRepositoryCallback>*)
4.) EPiServer.Commerce.Order.Internal.DefaultOrderRepository
5.) Instance of EPiServer.Commerce.Order.IOrderRepository (EPiServer.Commerce.Order.Internal.DefaultOrderRepository)
6.) new ProfileMigrator(*Default of IOrderRepository*, *Default of ICurrentMarket*, *Default of CartMigrator*)
7.) EPiServer.Commerce.Order.ProfileMigrator
8.) Instance of EPiServer.Commerce.Order.IProfileMigrator (EPiServer.Commerce.Order.ProfileMigrator)
9.) Container.GetInstance(EPiServer.Commerce.Order.IProfileMigrator)

vid lambda_method(Closure , IBuildSession , IContext )
vid StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context)
vid StructureMap.Pipeline.LazyLifecycleObject`1.CreateValue()
vid StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle)
vid StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph)
vid StructureMap.Container.GetInstance(Type pluginType)
vid EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)

Activation error occurred while trying to get instance of type SerializableCartProvider, key ""
vid EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
vid EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService]()
vid EPiServer.ServiceLocation.Internal.StructureMapConfiguration.TypedFactory`1.<Create>b__2_0(IServiceLocator s)
vid lambda_method(Closure , IBuildSession , IContext )

Failure while building 'Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Commerce.Order.IOrderFormCalculator,EPiServer.Commerce.Order.IOrderFormCalculator]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Commerce.Order.IOrderFormCalculator])._serviceLocator)', check the inner exception for details
1.) Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Commerce.Order.IOrderFormCalculator,EPiServer.Commerce.Order.IOrderFormCalculator]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Commerce.Order.IOrderFormCalculator])._serviceLocator)
2.) Instance of EPiServer.Commerce.Order.IOrderFormCalculator
3.) new DefaultOrderGroupCalculator(*Default of IOrderFormCalculator*, *Default of IReturnOrderFormCalculator*, *Default of IMarketService*)
4.) EPiServer.Commerce.Order.Calculator.DefaultOrderGroupCalculator
5.) Instance of EPiServer.Commerce.Order.IOrderGroupCalculator (EPiServer.Commerce.Order.Calculator.DefaultOrderGroupCalculator)
6.) new PurchaseOrderProvider(*Default of ICurrentMarket*, *Default of IOrderGroupCalculator*, *Default of ReferenceConverter*, *Default of IContentLoader*, *Default of ICatalogSystem*, *Default of IRelationRepository*, *Default of ServiceAccessor<SiteContext>*, *Default of LanguageResolver*, *Default of CustomerContext*)
7.) EPiServer.Commerce.Order.Internal.PurchaseOrderProvider
8.) Instance of EPiServer.Commerce.Order.IPurchaseOrderProvider (EPiServer.Commerce.Order.Internal.PurchaseOrderProvider)
9.) new SerializableCartProvider(*Default of OperationKeysTransformer*, *Default of SerializableCartDB*, *Default of ServiceAccessor<SiteContext>*, *Default of ICurrentMarket*, *Default of IPurchaseOrderProvider*, *Default of IPaymentPlanProvider*, *Default of IOrderGroupFactory*, *Default of IOrderNumberGenerator*, *Default of ICouponUsage*, *Default of IOrderGroupCalculator*)
10.) EPiServer.Commerce.Order.Internal.SerializableCartProvider
11.) Instance of EPiServer.Commerce.Order.Internal.SerializableCartProvider
12.) Container.GetInstance(EPiServer.Commerce.Order.Internal.SerializableCartProvider)

vid lambda_method(Closure , IBuildSession , IContext )
vid StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context)
vid StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle)
vid StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph)
vid StructureMap.Container.GetInstance(Type pluginType)
vid EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)

Activation error occurred while trying to get instance of type IShippingCalculator, key ""
vid EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
vid EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService]()
vid EPiServer.Commerce.Initialization.ServiceInitialization.<>c.<ConfigureContainer>b__0_2(IServiceLocator locator)
vid EPiServer.ServiceLocation.Internal.StructureMapConfiguration.TypedFactory`1.<Create>b__2_0(IServiceLocator s)
vid lambda_method(Closure , IBuildSession , IContext )

Failure while building 'Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Commerce.Order.IShippingCalculator,EPiServer.Commerce.Order.IShippingCalculator]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Commerce.Order.IShippingCalculator])._serviceLocator)', check the inner exception for details
1.) Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Commerce.Order.IShippingCalculator,EPiServer.Commerce.Order.IShippingCalculator]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Commerce.Order.IShippingCalculator])._serviceLocator)
2.) Instance of EPiServer.Commerce.Order.IShippingCalculator
3.) Container.GetInstance(EPiServer.Commerce.Order.IShippingCalculator)

vid lambda_method(Closure , IBuildSession , IContext )
vid StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context)
vid StructureMap.Pipeline.LazyLifecycleObject`1.CreateValue()
vid StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle)
vid StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph)
vid StructureMap.Container.GetInstance(Type pluginType)
vid EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)

Activation error occurred while trying to get instance of type ILineItemCalculator, key ""
vid EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
vid EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService]()
vid EPiServer.Commerce.Initialization.ServiceInitialization.<>c.<ConfigureContainer>b__0_4(IServiceLocator locator)
vid EPiServer.ServiceLocation.Internal.StructureMapConfiguration.TypedFactory`1.<Create>b__2_0(IServiceLocator s)
vid lambda_method(Closure , IBuild

Does anyone have any idea of what could be wrong?

#216229
Jan 30, 2020 9:23
Vote:
 

I assume you are NOT using the serializable cart mode?

#216233
Jan 30, 2020 10:32
Vote:
 

First time no. I did enable it on the second try before i upgraded to Commerce 12.

#216235
Edited, Jan 30, 2020 12:20
Vote:
 

f.chef,

To clarify: when you were trying to upgrade from commerce 11.2.6 to 13.14.1, were you using serializable cart mode?

#216244
Edited, Jan 30, 2020 15:19
Vote:
 

Hi Bob,
The first time i tried to upgrade, from commerce 11.2.6 to 13.14.1 i did not use serializable cart mode. (First error message)

The second try, new database copy, from v 11.2.6 i enabled serializable cart mode upgraded first to v. 12.17.2 which worked fine and then tried to upgrade to 13.0.0. (Second error message, almost the same as the first one except this part Activation error occurred while trying to get instance of type SerializableCartProvider, key "")


#216263
Jan 31, 2020 7:21
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.