Tuesday, January 14, 2020

Sitecore XC error Commerce.Connector - Release mapping lock

 Recently, We have updated the configuration of commerce authoring and got very strange errors as below

 1508 12:44:10 ERROR Commerce.Connector - Request URL: GetCatalogMappings(environmentName='') - Exception: System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.  
   --- End of inner exception stack trace ---  
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)  
   at Sitecore.Commerce.Engine.Connect.DataProvider.CommerceRepository.InvokeHttpClientGet(String serviceCallUrl, Boolean useCommerceOps, Boolean raiseException, String language, String environment, IDictionary`2 headers)  
 ---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---  
 Exception: System.AggregateException  
 Message: One or more errors occurred.  
 Source: mscorlib  
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)  
   at Sitecore.Commerce.Engine.Connect.DataProvider.CommerceRepository.InvokeHttpClientGet(String serviceCallUrl, Boolean useCommerceOps, Boolean raiseException, String language, String environment, IDictionary`2 headers)  
 Nested Exception  
 Exception: System.Threading.Tasks.TaskCanceledException  
 Message: A task was canceled.  
 1508 12:44:10 INFO Commerce.Connector - Release mapping lock  
 1508 12:44:10 INFO Commerce.Connector - Acquiring mapping lock  
 1508 12:44:10 INFO Commerce.Connector - Mapping locked  
 1508 12:47:40 ERROR Commerce.Connector - Request URL: GetCatalogMappings(environmentName='') - Exception: System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.  
   --- End of inner exception stack trace ---  
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)  
   at Sitecore.Commerce.Engine.Connect.DataProvider.CommerceRepository.InvokeHttpClientGet(String serviceCallUrl, Boolean useCommerceOps, Boolean raiseException, String language, String environment, IDictionary`2 headers)  
 ---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---  
 Exception: System.AggregateException  
 Message: One or more errors occurred.  
 Source: mscorlib  
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)  
   at Sitecore.Commerce.Engine.Connect.DataProvider.CommerceRepository.InvokeHttpClientGet(String serviceCallUrl, Boolean useCommerceOps, Boolean raiseException, String language, String environment, IDictionary`2 headers)  
 Nested Exception  
 Exception: System.Threading.Tasks.TaskCanceledException  
 Message: A task was canceled.  
We didn't find the root caue but a full redployment and restart of the IIS had resovled that issue

Friday, January 3, 2020

Sitecore Experience Commerce (How to add associated entity in case of No result found)

For adding a related product list, We need to associate product entity with the existing product, I was trying to add a product but couldn't find that product in the search result.



in this case, make sure to search the product by full entity name like  Entity-SellableItem-DN151254


even, in that case, you wouldn't see the result but just press the enter or yes button, You will see that the product has been associated with the current product.

that's how we search and associate entity.