BPM Runtime Caught an Unexpected Exception of 'File Not Found' in System Monitor

Hello All,

Getting the following error when users are attempting to run our AR Invoice Form. The thing is, the report prints and seems to be fine, and the associated BPM has no syntax errors, and has yet to throw an error when running:

Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask: BPM runtime caught an unexpected exception of ‘FileNotFoundException’ type.
See more info in the Inner Exception section of Exception Details.
Stack Trace:
at Epicor.Customization.Bpm.DirectiveBase3.Execute(TParam parameters) in C:\_Releases\ICE\ICE3.2.200.11\Source\Server\Internal\Lib\Epicor.Customization.BPM\DirectiveBase.Generic.cs:line 163 at System.Linq.Enumerable.All[TSource](IEnumerable1 source, Func2 predicate) at Epicor.Customization.Bpm.CustomizationBase23.Execute(TParam parameters) in C:_Releases\ICE\ICE3.2.200.11\Source\Server\Internal\Lib\Epicor.Customization.BPM\CustomizationBase2.cs:line 73
at Epicor.Customization.Bpm.Standard.MonitoringSessionManager.ProcessCollectedData(IceDataContext db, IRowChangesCollection data, IDirectiveEnabler enabler) in C:_Releases\ICE\ICE3.2.200.11\Source\Server\Internal\Lib\Epicor.Customization.BPM\Standard\MonitoringSessionManager.cs:line 130
at Epicor.Customization.Bpm.Standard.NestedMonitoringSessionManager.FinalizeSession(String sessionId, IceDataContext db) in C:_Releases\ICE\ICE3.2.200.11\Source\Server\Internal\Lib\Epicor.Customization.BPM\Standard\NestedMonitoringSessionManager.cs:line 63
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_Releases\ICE\ICE3.2.200.11\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_Releases\ICE\ICE3.2.200.11\Source\Server\Services\Lib\RunTask\RunTask.cs:line 549
Inner Exception:
Could not load file or assembly ‘UpdateTermsCode, Version=10.2.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.
Stack Trace:
at Epicor.Customization.Bpm.DB4BCBF6D0236E4568BD833D8B3C14235A.PostTranDirective_AY01_AYM_Terms_Code_Update_9D97D4B128E947B8BB4D4024BD2BE41F.A001_CustomCodeAction()
at Epicor.Customization.Bpm.DB4BCBF6D0236E4568BD833D8B3C14235A.PostTranDirective_AY01_AYM_Terms_Code_Update_9D97D4B128E947B8BB4D4024BD2BE41F.ExecuteCore()
at Epicor.Customization.Bpm.DirectiveBase`3.Execute(TParam parameters) in C:_Releases\ICE\ICE3.2.200.11\Source\Server\Internal\Lib\Epicor.Customization.BPM\DirectiveBase.Generic.cs:line 147

Some context on the BPM - it calls a custom dll that has been placed in \OurAppServer\wwwroot\E10Prod\Server\Customization\Externals in the InvcHead Standard Data Directive. All dependencies/references, to the best of my ability, were placed in that folder also. There are no errors when checking the syntax in the BPM. The dlls called in the executable are:

Epicor.Ice.Version
Epicor.ServiceModel
Erp.Contracts.BO.ARInvoice
Ice.Core.Session
Ice.Lib.EpiClientLib

Any help would be much appreciated.

Thanks,
Blake

Is your custom code accessing the disk at all? Could it be related to permissions (I assume when ran from a task, it will be on task agent permissions)

Also, I dont have a warm fuzzy about using an external DLL on a Data Directive for performance reasons. There are way smarter people than myself who could weigh in on that.

1 Like

I agree with the fact that the external dll in the data directive probably isn’t ideal. My goal is to get it into a Method Directive for all new invoices (ARInvoice.GetShipments is my thought right now, that would get the majority of invoices as they are created from shipments, but from my understanding wouldn’t get all of them) and call the BO from there. Any feedback on that would be much appreciated.

Until that is changed, the data directive call is still in place. As for the custom code accessing the disk, what do you mean by that specifically? The dll updates a few fields via the ARInvoice BO and does access our sys config file from the same externals folder. There are no direct calls to the DB.

Thanks for the reply,
Blake

Looks like it cant find this assembly:
UpdateTermsCode (v10.2.0.0)

That is the confusing part - the dll has been placed at the following location - \OurAppServer\wwwroot\E10Prod\Server\Customization\Externals - so it is there. The directive validates and everything

Is that DLL Blocked? By chance?

1 Like

It does not appear as if that DLL is blocked

DllProperties

I believe the issue here lies in the fact that we have two App Servers. One is in charge of reports, the other everything else. So while the dll and it’s dependencies works fine when called from our first app server, when a report is printed, and goes to update a field on the invchead table, the data directive that calls the dll cannot find the dll as it is on the second app server.

We will be moving the dll to a method directive, so this error should not bother us anymore. Thanks for the help and suggestions.

Blake

Oh yah copy the dll to both appservers
Or use a shared folder

We have 6 app servers shared folder works great