I have a sitecore commerce site in my local machine and when I click the 'Book Now' button on the website, it shows this error message:
GetCurrentCart: Activation error occured while trying to get instance of type ICacheManager, key "Sitecore_CommerceCartCache"
The commerceengine site which is in the same machine is also up. I tried restarting IIS but no luck.
These are the registered logs:
ERROR Commerce Server: Error retrieving the Cache Manager. Message: Activation error occured while trying to get instance of type ICacheManager, key "Sitecore_CommerceCartCache" 15084 13:05:52 ERROR GetCurrentCart failed Exception: Microsoft.Practices.ServiceLocation.ActivationException Message: Activation error occured while trying to get instance of type ICacheManager, key "Sitecore_CommerceCartCache" Source: Sitecore.Commerce.Connect.CommerceServer at Sitecore.Commerce.Connect.CommerceServer.Caching.EnterpriseLibraryCacheProvider.GetCache(String prefix, String cacheName, String& actualCacheName) at Sitecore.Commerce.Connect.CommerceServer.Caching.EnterpriseLibraryCacheProvider.GetData[T](String prefix, String cacheName, String cacheKey) at Sitecore.Foundation.Commerce.Website.Util.CartCacheHelper.GetCart(String customerId) in D:\Projects\External\DC Ecomm\sitecore.demo.retail\src\Foundation\Commerce\Website\Sitecore.Foundation.Commerce.Website\Util\CartCacheHelper.cs:line 65 at Sitecore.Feature.Commerce.Orders.Website.Controllers.CartController.GetCurrentCart() in D:\Projects\External\DC Ecomm\sitecore.demo.retail\src\Feature\Orders\Website\Sitecore.Feature.Commerce.Orders.Website\Controllers\CartController.cs:line 139
Nested Exception
Exception: Microsoft.Practices.Unity.ResolutionFailedException Message: Resolution of the dependency failed, type = "Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager", name = "Sitecore_CommerceCartCache". Exception occurred while: while resolving. Exception is: InvalidOperationException - The current type, Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, is an interface and cannot be constructed. Are you missing a type mapping? ----------------------------------------------- At the time of the exception, the container was:
Resolving Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager,Sitecore_CommerceCartCache
Source: Microsoft.Practices.Unity at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) at Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides) at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
Nested Exception
Exception: System.InvalidOperationException Message: The current type, Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, is an interface and cannot be constructed. Are you missing a type mapping? Source: Microsoft.Practices.Unity at Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForAttemptingToConstructInterface(IBuilderContext context) at BuildUp_Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager(IBuilderContext ) at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
1584 13:05:53 ERROR Commerce Server: Error retrieving the Cache Manager. Message: Activation error occured while trying to get instance of type ICacheManager, key "Sitecore_CommerceCartCache" 1584 13:05:53 ERROR GetCurrentCart failed Exception: Microsoft.Practices.ServiceLocation.ActivationException Message: Activation error occured while trying to get instance of type ICacheManager, key "Sitecore_CommerceCartCache" Source: Sitecore.Commerce.Connect.CommerceServer at Sitecore.Commerce.Connect.CommerceServer.Caching.EnterpriseLibraryCacheProvider.GetCache(String prefix, String cacheName, String& actualCacheName) at Sitecore.Commerce.Connect.CommerceServer.Caching.EnterpriseLibraryCacheProvider.GetData[T](String prefix, String cacheName, String cacheKey) at Sitecore.Foundation.Commerce.Website.Util.CartCacheHelper.GetCart(String customerId) in D:\Projects\External\DC Ecomm\sitecore.demo.retail\src\Foundation\Commerce\Website\Sitecore.Foundation.Commerce.Website\Util\CartCacheHelper.cs:line 65 at Sitecore.Feature.Commerce.Orders.Website.Controllers.CartController.GetCurrentCart() in D:\Projects\External\DC Ecomm\sitecore.demo.retail\src\Feature\Orders\Website\Sitecore.Feature.Commerce.Orders.Website\Controllers\CartController.cs:line 139
Nested Exception
Exception: Microsoft.Practices.Unity.ResolutionFailedException Message: Resolution of the dependency failed, type = "Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager", name = "Sitecore_CommerceCartCache". Exception occurred while: while resolving. Exception is: InvalidOperationException - The current type, Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, is an interface and cannot be constructed. Are you missing a type mapping?