When Using a REST-Generated Component in a Project - A "The system cannot find the file specified" error is Generated
search cancel

When Using a REST-Generated Component in a Project - A "The system cannot find the file specified" error is Generated

book

Article ID: 163769

calendar_today

Updated On:

Products

Workflow Solution

Issue/Introduction

When using a REST-Generated component in a  workflow project, an error is generated.  Perform the following to reproduce:

  1. Build a web form project with REST service components.
  2. Publish it to IIS.
  3. Try to run the form from StartDialog.aspx page.

The form will not load. You will see an error message.

  System.Exception: Execution Exception ---> System.Exception: exception Component created:  ---> LogicBase.Framework.BusinessRuleException: The critical error failed execution on component People : Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system  cannot find the file specified. :    at LogicBase.Core.Generators.Components.RestBaseComponent.ReadResponseJson(Stream stream)
   At LogicBase.Core.Generators.Components.RestBaseComponent.ReadResponseContent(I
 Data data, Stream stream)  at LogicBase.Core.Generators.Components.RestBaseComponent.Run(IData data)  at
LogicBase.Core.ExecutionEngine.MultiPathProcessComponentExecutionDelegate.Execute(IData
data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine  engine, TLExecutionContext context)
   at
LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent (TLExecutionContext
context, IData data, IOrchestrationComponent comp)    --- End of inner exception stack trace ---
   at  LogicBase.Core.ExecutionEngine.ExceptionComponentDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context)
   --- End of inner exception stack trace ---

Environment

ITMS 8.x

Workflow 8.x

Cause

The JSON core library called Newtonsoft.JSON.dll is not added to the published version of the project.

Resolution

As a workaround, add the Newtonsoft.Json.dll manually to the project, and, while publishing, make sure it is listed under Libraries tab, and properly checked in Publish checkbox. You can also copy the file to the ...Program Files\Symantec\Workflow\Shared folder so that it can be referenced.

NOTE: In one case the Newtonsoft.Json.dll also had to be manually place in the C:\Program Files\Symantec\Workflow\WorkflowDeploy\Release\CT.WS.IG.SYM\bin folder.