For past few days, the below exception has taken away my sleep. This error occurs in our pre-prod environment and it is totally unpredictable. You may get or may not get with the same data. Profile registration is first page to any ecommerce application and as it is failing here and as usual everyone swords are towards me for the fix.
|
An exception of type ‘Microsoft.CommerceServer.Runtime.Profiles.CommerceProfileSystemException’ occurred and was caught.
———————————————————————————————————————— 06/15/2010 03:58:49 Type : Microsoft.CommerceServer.Runtime.Profiles.CommerceProfileSystemException, Microsoft.CommerceServer.Runtime, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\ Message : Failed to set value for profile property ‘email_address’. Source : Microsoft.CommerceServer.Runtime Help link : Data : System.Collections.ListDictionaryInternal TargetSite : Void set_Value(System.Object) Stack Trace : at Microsoft.CommerceServer.Runtime.Profiles.ProfileProperty.set_Value(Object value) at Microsoft.Commerce.Providers.Translators.ProfileTranslatorBase.SetProperty(Profile destinationObject, String propertyName, Object propertyValue) at Microsoft.Commerce.Providers.Translators.ProfileTranslatorBase.TranslateInternal(CommerceEntity sourceObject, Profile destinationObject, CommercePropertyCollection propertiesToReturn) at Microsoft.Commerce.Providers.Translators.UserProfileTranslator.Translate(CommerceEntity sourceCommerceEntity, Object destinationObject) at Microsoft.Commerce.Providers.Translators.Translator.ToExternalEntity(CommerceEntity sourceCommerceEntity, Object destinationType) at Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.Update(IEnumerable`1 commerceProfileList, CommerceEntity operationModel) at Microsoft.Commerce.Providers.Components.ProfileCommitterBase.ExecuteUpdate(CommerceUpdateOperation updateOperation, OperationCacheDictionary operationCache, CommerceUpdateOperationResponse response) at Microsoft.Commerce.Providers.Components.OperationSequenceComponent.Execute(CommerceOperation operation, OperationCacheDictionary operationCache, CommerceOperationResponse response) at Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.Execute(CommerceOperation operation, OperationCacheDictionary operationCache, CommerceOperationResponse response) at Microsoft.Commerce.Broker.OperationSequence.ExecuteComponentTree(List`1 executionTreeList, CommerceOperation operation, OperationCacheDictionary operationCache, CommerceOperationResponse response) at Microsoft.Commerce.Broker.OperationSequence.Execute(CommerceOperation operation) at Microsoft.Commerce.Broker.MessageHandler.ProcessMessage(String messageHandlerName, CommerceOperation operation) at Microsoft.Commerce.Broker.OperationService.InternalProcessRequest(CommerceRequest request) at Microsoft.Commerce.Broker.OperationService.ProcessRequest(CommerceRequest request)
|
Since the error is happening in translator, I suspect that I am passing wrong data to the commerce server. I verified that user_id (guid) and email address are sent from controller class. I google or binged but no luck.
Missile trigger happens at one place and damage at another place. This problem comes under same category. Everybody sees this as commerce server exception as below error found in event log with lot of “commerce” words. After lot of efforts, I found that the error is due to assigning to wrong GUID and email_ID. For example, consider following data.
First I sign-in with user 1 and both user_id and email_id are stored in cookie. I press sign-out email_id is removed from cookie but not user_id. The second time, I logged in with user2 now this time, the user 2 email_id is keep in cookie but its GUID is not updated (as the old object already exist in the cookie). When I try to save user profile, I am passing GUID1 and user2@test.com to commerce server and it is throwing exception as the update operation tries to update row 1 with user2@test.com in email_id field (which is a unique key).
If you like this post, please click on our sponsor advertisement.