Friday, July 20, 2018

Sitecore Experience Commerce - InvalidPolicySetJson on boostrap

When attempting to bootstrap the commerce engine, after upgrading the instance from update 1 to update 2, the following error occurred:
"@odata.context": "https://localhost:5015/CommerceOps/$metadata#Commands/$entity",
"@odata.type": "#Sitecore.Commerce.Core.Commands.BootstrapCommand",
"Id": "3f98d6d62af54509904abc8b9cc7cf37",
"ResponseCode": "Error",
"Messages": [
{
"MessageDate": "2018-07-19T22:24:26.5227643Z",
"Code": "Error",
"Text": "PolicySet json is not valid.",
"CommerceTermKey": "InvalidPolicySetJson"
}
]
This is a generic, error and the next step is to check the logs of the commerce engine instance you are calling (in this case the ops environment). This gave the following more detailed error:
ERROR Error resolving type specified in JSON 'Sitecore.Commerce.Plugin.Workflow.WorkflowPolicy, Sitecore.Commerce.Plugin.Workflow'. Path 'Policies.$values[0].$type', line 12, position 102.Newtonsoft.Json.JsonSerializationException: Error resolving type specified in JSON 'Sitecore.Commerce.Plugin.Workflow.WorkflowPolicy, Sitecore.Commerce.Plugin.Workflow'. Path 'Policies.$values[0].$type', line 12, position 102. ---> Newtonsoft.Json.JsonSerializationException: Could not load assembly 'Sitecore.Commerce.Plugin.Workflow'.
In my case I had missed the Sitecore.Commerce.Plugin.Workflow.dll file in my upgrade of the commerce engine (SDK) project.

No comments:

Post a Comment