Nullable object must have a value - time and expense entry

Is there any missing setup value inside the whole Time and expense setup ? we are getting too much errors while doing the entries ?
i have checked by disabling all BPMs, still the error coming frequently.

Following is the log…
Application Error

Exception caught in: Epicor.ServiceModel

Error Detail

Message: Nullable object must have a value.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException

Client Stack Trace

at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at Erp.Internal.Lib.AdjShopL.CapacityForThisMachDay(ResourceTimeUsed bResourceTimeUsed, Boolean IP_Direction, Decimal IP_HoursToApply, Decimal& OP_HoursApplied, ResourceCal& ResourceCal, ProdCalDay& ProdCalDay) in c:_Releases\ERP\RL10.1.600.0\Source\Server\Internal\Lib\JobOperShared\AdjShopL\adjshopl.cs:line 368
at Erp.Internal.Lib.AdjShopL.ScheduleLostHours(Boolean IP_WhatIf, JobOper bJobOper, Decimal HoursToApply, ResourceGroup& ResourceGroup, ProdCal& ProdCal, Resource& Resource, JobOper& JobOper, ResourceTimeUsed& ResourceTimeUsed, ResourceCal& ResourceCal, ProdCalDay& ProdCalDay) in c:_Releases\ERP\RL10.1.600.0\Source\Server\Internal\Lib\JobOperShared\AdjShopL\adjshopl.cs:line 2228
at Erp.Internal.Lib.AdjShopL.ApplyLoad(Decimal HoursToApply, Boolean IP_WhatIf, JobOper JobOper) in c:_Releases\ERP\RL10.1.600.0\Source\Server\Internal\Lib\JobOperShared\AdjShopL\adjshopl.cs:line 769
at Erp.Internal.Lib.AdjShopL.Update_ResourceTimeUsed(JobOper JobOper, JobOper OldJobOper) in c:_Releases\ERP\RL10.1.600.0\Source\Server\Internal\Lib\JobOperShared\AdjShopL\adjshopl.cs:line 323
at Erp.Internal.Lib.JobOperWrite._JobOperWrite(JobOper JobOper, JobOper OldJobOper, Boolean RollUp) in c:_Releases\ERP\RL10.1.600.0\Source\Server\Internal\Lib\JobOperShared\JobOperWrite\JobOperWrite.i.cs:line 1414
at Erp.Internal.Lib.JobOperShWrite.DoJobOper(JobOper JobOper, JobOper OLDJobOper) in c:_Releases\ERP\RL10.1.600.0\Source\Server\Internal\Lib\JobOperShared\JobOperShWrite\JobOperShWrite.cs:line 1309
at Erp.Triggers.JobOper.WriteTrigger.write(JobOper JobOper, JobOper OldJobOper) in c:_Releases\ERP\RL10.1.600.0\Source\Server\Db\Triggers\JobOper\write.cs:line 224
at Ice.Triggers.TriggerQueue.ExecuteWriteTrigger(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 296
at Ice.Triggers.TriggerQueue.RunWriteTriggerInNewLevel(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord, Boolean forAddedRow) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 157
at Ice.Triggers.TriggerQueue.<>c__DisplayClass11_0.b__1() in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 148
at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func1 buildTriggerRunState, Action action) in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 501 at Ice.Triggers.TriggerQueue.RunTriggers(IceDataContext context) in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 83 at Ice.IceDataContext.RunUntilAllTriggersHaveExecuted() in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 566 at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func1 buildTriggerRunState, Action action) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 501
at Ice.IceDataContext.Validate[TLinqRow](TLinqRow row) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 323
at Ice.IceDataContext.Release[TEntity](TEntity& entity) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 263
at Erp.Triggers.LaborDtl.WriteTrigger.Write(LaborDtl LaborDtl, LaborDtl OLaborDtl) in c:_Releases\ERP\RL10.1.600.0\Source\Server\Db\Triggers\LaborDtl\Write.cs:line 1669
at Ice.Triggers.TriggerQueue.ExecuteWriteTrigger(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 296
at Ice.Triggers.TriggerQueue.RunWriteTriggerInNewLevel(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord, Boolean forAddedRow) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 157
at Ice.Triggers.TriggerQueue.<>c__DisplayClass11_0.b__1() in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 148
at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func1 buildTriggerRunState, Action action) in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 501 at Ice.Triggers.TriggerQueue.RunTriggers(IceDataContext context) in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 83 at Ice.IceDataContext.RunUntilAllTriggersHaveExecuted() in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 566 at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func1 buildTriggerRunState, Action action) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 501
at Ice.IceDataContext.Validate[TLinqRow](TLinqRow row) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 323
at Ice.TablesetBound3.CreateRow(IceDataContext dataContext, Int32 tableNum, IIceTable table, IceRow newTablesetRow, TablesetProfilingCollector parentTraceCollector) in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 1099 at Ice.TablesetBound3.WriteTable(IceDataContext dataContext, Int32 tableIndex, IIceTable table, TablesetProfilingCollector parentTraceCollector) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 935
at Ice.TablesetBound3.InnerUpdate(IceDataContext dataContext, TFullTableset tableset) in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 846 at Erp.Services.BO.LaborSvc.Update(LaborTableset& ds) in c:\_Releases\ERP\RL10.1.600.0\Source\Server\Services\BO\Labor\Labor.Designer.cs:line 2358 at Epicor.Customization.Bpm.MethodCustomizationBase23.RunDirectives(TParam parameters) in c:_Releases\ICE\3.1.600.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 215
at Epicor.Customization.Bpm.CustomizationBase23.Execute(TParam parameters) in c:\_Releases\ICE\3.1.600.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 71 at Epicor.Customization.Bpm.BO815D1210C9EC477D8CE18DC1A4B3FC7E.LaborSvcCustomization.Update(LaborTableset& ds) at Erp.Services.BO.LaborSvcFacade.Update(LaborTableset& ds) in c:\_Releases\ERP\RL10.1.600.0\Source\Server\Services\BO\Labor\LaborSvcFacade.cs:line 1902 at SyncInvokeUpdate(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func2 func) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 47
at Epicor.Hosting.Wcf.EpiOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.System\Hosting\Wcf\EpiOperationInvoker.cs:line 23
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

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.TimeAndExpenseEntry.Transaction.Update()

Ive seen this a couple of times. I beleive it occurs when upgrading to any version past 10.1.500.

Go to shift maintenance and reenter all shift, break, and lunch times. You can set them back to the original values. This should fix the error.

This happened to us after our E9 upgrade on all our shifts that started, ended or had lunches at 12:00AM.

Thanks…actually i was also doubtful about shift timings…today i will try by changing breaks, lunch and all shifts…

Still the same issues…after updating all shifts and breaks…some of them,stopped showing this errors after changing the operations and then set it to its original operations…anything happening wrong with operations ?

The error looks to be bubbling up in the CapacityForThisMachDay function which is tied to resources and production calendars. Maybe its an issue with a resource or schedule?

@jhawt: i have rechecked the setup …in production calender all resources and groups are added…so there is nothing do…i think i am missing something in resource group setup… and i am wondering about this error is displayed for few job orders…irrespective to changed resource groups in Time & Expense entry …i.e changed operation in T&Expense entry… what will be the causes…any guess?

Finally, found the reason…i have re-scheduled the job and it worked…

2 Likes

@Prakash_Bankar - I had the same issue before - I was advised that there was some form of corruption on the pointers however the cause was not able to be explained.