Part screen strange error

Weird one here. Has @hkeric.wci stuck as well. This is only happening in our DEV environment in our Global company. Only happens on Part updates, not new parts. The error is here:

Server Side Exception

A server error occurred. Review the server event logs for details.

Exception caught in: Epicor.ServiceModel

Error Detail 
============
Correlation ID:  238b388e-7907-404b-a922-7306f3c91345
Description:  A server error occurred. Review the server event logs for details.
Program:  Epicor.Ice.Server.Wcf.Core.dll
Method:  ProvideFault
Line Number:  33
Column Number:  17
Server Trace Stack:     at Epicor.Hosting.Wcf.ErrorHandler.ProvideFault(Exception error, MessageVersion version, Message& fault) in C:\_Releases\ICE\ICE3.2.700.0\Source\Framework\Ice.Server.Wcf.Core\Hosting\Wcf\ErrorHandler.cs:line 33
   at System.ServiceModel.Dispatcher.ErrorBehavior.ProvideFault(Exception e, FaultConverter faultConverter, ErrorHandlerFaultInfo& faultInfo)
   at System.ServiceModel.Dispatcher.ErrorBehavior.ProvideMessageFaultCore(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage8(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.ProcessError(Exception e)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
   at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
   at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
   at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
   at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
   at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)
   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
   at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)
   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
   at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
   at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
   at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
   at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
   at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
   at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
   at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
   at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
   at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)



Client Stack Trace 
==================
   at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
   at Erp.Proxy.BO.PartImpl.Update(PartDataSet ds)
   at Erp.Adapters.PartAdapter.OnUpdate()
   at Ice.Lib.Framework.EpiBaseAdapter.Update()
   at Erp.UI.App.PartEntry.PartTransaction.AdapterUpdate()
   at Erp.UI.App.PartEntry.PartTransaction.UpdateX()

And the server logs show this:

  <Exception><![CDATA[System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'idxCategory_c', table 'EpicorERP.IM.IMPart'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Ice.SystemIntegration.Integration.ExecuteSqlCommand(String sql, List`1 sqlParameters) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.Ice\SystemIntegration\Integration.cs:line 1848
   at Ice.SystemIntegration.Integration._CreateIMTable(LinqRow rec, LockHint lockHint, Boolean retrieveAfterCreate) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.Ice\SystemIntegration\Integration.cs:line 891
   at Ice.SystemIntegration.Integration.CreateIMTableWithRetrieve[TLinqRow](TLinqRow& rec, LockHint lockHint) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.Ice\SystemIntegration\Integration.cs:line 907
   at Erp.Triggers.Part.WriteTrigger.quewrite(Part NewPart, Part OldPart) in C:\_releases\ERP\ERP10.2.700.0\Source\Server\Db\Triggers\Part\Write.cs:line 421
   at Erp.Triggers.Part.WriteTrigger.Write(Part NewPart, Part OldPart) in C:\_releases\ERP\ERP10.2.700.0\Source\Server\Db\Triggers\Part\Write.cs:line 131
   at Ice.DataTrigger`2.Ice.ILinqTrigger.Write(LinqRow newRecord, LinqRow oldRecord) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.Ice\Triggers\TriggerBase.cs:line 22
   at Ice.Triggers.TriggerQueue.ExecuteWriteTrigger(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 298
   at Ice.Triggers.TriggerQueue.RunWriteTriggerInNewLevel(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord, Boolean forAddedRow) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 156
   at Ice.Triggers.TriggerQueue.<>c__DisplayClass9_0.<RunWriteTrigger>b__1() in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 147
   at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func`1 buildTriggerRunState, Action action) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 501
   at Ice.Triggers.TriggerQueue.RunTriggers(IceDataContext context) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 82
   at Ice.IceDataContext.RunUntilAllTriggersHaveExecuted() in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 565
   at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func`1 buildTriggerRunState, Action action) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 501
   at Ice.IceDataContext.Validate[TLinqRow](TLinqRow row) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 328
   at Ice.TablesetBound`3.UpdateRow(IceDataContext dataContext, Int32 tableNum, IIceTable table, IceRow updatedRow, IceRow originalRow, IColumnUncensor uncensor, TablesetProfilingCollector parentTraceCollector) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 1291
   at Ice.TablesetBound`3.WriteTable(IceDataContext dataContext, Int32 tableIndex, IIceTable table, TablesetProfilingCollector parentTraceCollector) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 980
   at Ice.TablesetBound`3.InnerUpdate[TUpdater](IceDataContext dataContext, TFullTableset tableset) in C:\_releases\ICE\ICE3.2.700.26\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 872
   at Erp.Services.BO.PartSvc.Update(PartTableset& ds) in C:\_releases\ERP\ERP10.2.700.26\Source\Server\Services\BO\Part\Part.Designer.cs:line 6078
   at Erp.Services.BO.PartSvcFacade.Update(PartTableset& ds) in C:\_releases\ERP\ERP10.2.700.26\Source\Server\Services\BO\Part\PartSvcFacade.cs:line 5927
   at SyncInvokeUpdate(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\ICE3.2.700.26\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
   at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_releases\ICE\ICE3.2.700.26\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\ICE3.2.700.0\Source\Framework\Ice.Server.Wcf.Core\Hosting\Wcf\EpiOperationInvoker.cs:line 23
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
ClientConnectionId:d8ef80f2-3b84-4d72-9620-855fc235b6a1
Error Number:515,State:2,Class:16]]></Exception>

The log references a UD column that is not being changed nor is it null. This happens in all customizations and in the base layer.

Just throwing out a possibility, has a UD field been added and the database regen not been done? That might cause something like that.

We have run the regen a couple times with no issue, so I think we have ruled that out, but thanks for the suggestion.

Was the regen run when the system was live?

Yes but I closed and reopened it afterwards. UD Column Maintenance shows everything is in sync.

Do a bpm on update and see if the field shows up in the dataset in the intellisense.

Don’t show when I try to use the ttTable. Show when I do a LINQ query to get rows and access those rows. Seems pretty normal to me.

I am vaguely recalling an issue like this.

I am digging through the archives now.

It was an issue with the FKV from Part to PartWhse or something like that. I had to fix it in SSMS some magical way… Certainly not directly in SQL. :face_with_peeking_eye:

(Edit) I am still looking. I came across this, which might be what I was thinking of. My notes are sparse, which implies that I had to do some of that “magic.”

Resolution:
image

Complaint:

It’s possible your regen was unsuccessful then.

Or possibly a mismatch between app servers.

Well I was wondering that too but seems consistent with other method directives I checked.

I’m uncertain. I’ve read where some versions had different behaviors on how or whether ud fields showed up in those. I don’t have direct experience on all versions.

Does that ud field have data in it?

Edit: I mean overall. Is it in use yet?

Yes it has data for roughly 30% of Parts. I added a new field that hasn’t been used at all yet and which is where I started getting this error, but it isn’t mentioned in the log as the issue.

Also I might have mentioned this but it works fine in our TST database and it works fine outside of our Global company in DEV.

I dunno.

I recall a post by @Rich that I believe said that while the risk was small, running a regen while everything is up could cause something like this.

Maybe you could export the data, remove the field(s) and regen. Add them back, regen, and import.

To verify the regen the columns of the UD table should all be in the dbo.view of that Erp table. If they are not one could look at the alter script for the view which is what I believe the regen creates.

1 Like

All of the UD fields show in the dbo.view, that is nice to know as a future place to check for similar issues.

The regen also recompiles a dll(s?) for Epicor to know they are there. If it’s failed, that’s where the issue will be.

If they are in the view then they just did not get loaded when the apppool was started. I rarely do it this way, but officially the process is stop, regen then start. I usually regen while it is running and just do a recycle even on our production server and have never had an issue.

I would just for giggles do the official process and see if it takes this time.

The regen logs look fine is that is what you are referencing.