So, in the MES, when trynig to log out of a job operation, we get the Object Ref Error. I ahve tried recycling/resetting the IIS and it does nothing to help. Ideas?
Application Error
Exception caught in: Epicor.ServiceModel
Error Detail
Message: Object reference not set to an instance of an object.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException
Client Stack Trace
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.LaborImpl.Update(LaborDataSet ds)
at Erp.Adapters.LaborAdapter.OnUpdate()
at Ice.Lib.Framework.EpiBaseAdapter.Update()
at Erp.UI.App.EndActivityEntry.EndActTransaction.Update()
Is this one particular job operation, or all? If one, you might want to check the database to see if there are appropriate associated labor and job records behind the scenes.
Anyone figure this out? We’re having same issue for 1 specific operation. Error pops up with any user logging to this one operation. Error pops if logged into custom MES, base MES, base Office MES, and handheld menu. Does not occur for other operations. Can’t see anything different on Resource Group, Resource, or Operation screens.
Client error:
Application Error
Exception caught in: Epicor.ServiceModel
Error Detail
============
Correlation ID: e695f19b-97e1-4e11-982c-c38173880aaa
Message: Object reference not set to an instance of an object.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException
Client Stack Trace
==================
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.LaborImpl.EndActivity(LaborDataSet ds)
at Erp.Adapters.LaborAdapter.EndActivity()
Server error:
Ice.Common.EpicorServerException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Erp.Services.BO.LaborSvc.EndActivity(LaborTableset& ds) in C:\_releases\ERP\ERP11.1.200.0\Source\Server\Services\BO\Labor\Labor.cs:line 6691
at Erp.Services.BO.LaborSvcFacade.EndActivity(LaborTableset& ds) in C:\_releases\ERP\ERP11.1.200.0\Source\Server\Services\BO\Labor\LaborSvcFacade.cs:line 1960
at SyncInvokeEndActivity(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func`2 func) in C:\_releases\ICE\ICE4.1.200.13\Source\Server\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_releases\ICE\ICE4.1.200.13\Source\Server\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28
--- End of inner exception stack trace ---
We traced this to moving an employee from one department to another. He had a Resource attached to his Emp ID, that was never used on any labordtl transaction. So after we moved him, and remove the resource group from Employee Maintenance, it deleted the resource. This somehow broke the operation, even though this specific resource was not assigned to it… we’re still looking into exactly why it broke.
Update - So issue is that at least Epicor ver 2021.2.13 will allow you to delete a resource even if there are operations scheduled to it (in ResourceTimeUsed table). Fix is to not delete those resources. Rather move them to an eg zzObsolete resource group. This prevents future jobs from scheduling those resources. Then after the current jobs finish, the ResourceTimeUsed table gets cleared out, and those bad resources can be deleted. To speed it up, you can “Remove From Schedule” on all the jobs referencing the bad resource, then reschedule.