Errors in execution of NAV Workflows

xgoalxgoal Member Posts: 4
For some time we are using NAV workflows (NAV 2016) and few times per week there are errors in event log related to this process. Do you have any ideas what causing those errors and what fixes could be applied? Extraction from event log is below.
Thanks in advance.

Server instance: NavServer
Tenant ID: default
Session type: RoleTailoredClient
Session ID: 9
User: ****\***************
Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavSqlException
ErrorNumber: 3971
SuppressMessage: False
SuppressExceptionCreatedEvent: False
FatalityScope: None
Message:
The following SQL error was unexpected:
The server failed to resume the transaction. Desc:4900000c33.
SQL statement:
SELECT TOP 1 NULL FROM "Database".dbo."Company$Workflow Table Relation Value" WITH(XLOCK) WHERE ("Workflow Step Instance ID"=@0 AND "Workflow Code"=@1 AND "Workflow Step ID"=@2 AND "Table ID"=@3 AND "Field ID"=@4 AND "Related Table ID"=@5 AND "Related Field ID"=@6 AND "timestamp"=@7) OPTION(OPTIMIZE FOR UNKNOWN)
StackTrace:
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ThrowNavSqlException(SqlExceptionAdapter exceptionAdapter, NavSqlCommand command, Boolean isLastExceptionARollbackCause, Boolean logExceptions)
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteFunction[T](Func`1 function, NavSqlCommand command)
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteFunctionWithTrace[T](EventTask task, Func`1 function, NavSqlCommand command)
at Microsoft.Dynamics.Nav.Runtime.NavSqlCommand.ExecuteReader()
at Microsoft.Dynamics.Nav.Runtime.NavSqlExistsCommand.ExecuteExists(FilterExpression filter)
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteCommandAndCacheOnSuccess[T](NavSqlCommandCacheKey commandKey, Func`1 createFunc, Func`2 executeFunc)
at Microsoft.Dynamics.Nav.Runtime.NavSqlExistsCommand.Exists(NavDatabase database, NCLMetaTable table, Int32 companyIndex, FilterExpression filter, Boolean locking, Boolean withXLock)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDmlCommand.ModifyImpl(NavDatabase database, NCLMetaTable table, Int32 companyIndex, MutableRecordBuffer record, FieldList modifiedFields, Boolean retrieveTimestamp, NavBigInteger& timestampValue, Boolean recordConsistentWithCurrentTransaction)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDmlCommand.Modify(NavDatabase database, NCLMetaTable table, Int32 companyIndex, MutableRecordBuffer record, Boolean retrieveTimestamp, Boolean recordConsistentWithCurrentTransaction, NavBigInteger& timestampValue)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDmlCommand.Modify(NavDatabase database, Int32 companyToken, MutableRecordBuffer recordBuffer, Boolean recordHasBeenReadWithLockInsideThisTransaction, NavBigInteger& timestampValue)
at Microsoft.Dynamics.Nav.Runtime.SqlTableDataProvider.Modify(Int32 companyToken, MutableRecordBuffer recordBuffer, Boolean recordHasBeenReadWithLockInsideThisTransaction, ReadOnlyRecordBuffer& outputRecordBuffer)
at Microsoft.Dynamics.Nav.Runtime.DataAccess.IssueModify(Int32 companyToken, MutableRecordBuffer inputRecordBuffer, Boolean withTimestampCheck, Boolean checkThatRecordExists, ReadOnlyRecordBuffer& outputRecordBuffer)
at Microsoft.Dynamics.Nav.Runtime.DataAccess.PerformModify(Int32 companyToken, Boolean recordWasReadWithLockInsideThisTransaction, Boolean useCache, MutableRecordBuffer& inputRecordBuffer, ReadOnlyRecordBuffer& outputRecordBuffer)
at Microsoft.Dynamics.Nav.Runtime.DataAccess.Modify(Int32 companyToken, MutableRecordBuffer inputRecordBuffer, ResultSetEnumerator& resultSetEnumerator, MutableRecordBuffer& newRecordBuffer)
at Microsoft.Dynamics.Nav.Runtime.RecordImplementation.ModifyRecord(DataError errorLevel)
at Microsoft.Dynamics.Nav.Runtime.NavRecord.Modify(DataError errorLevel, Boolean runApplicationTrigger, Boolean runGlobalTrigger, Boolean isBulkModify)
at Microsoft.Dynamics.Nav.Runtime.NavRecord.ALModify(DataError errorLevel, Boolean runApplicationTrigger, Boolean isBulkModify)
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Record1506.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1501.UpdateRelatedTableValues_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1501.UpdateRelatedTableValues(NavRecordRef recRef)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1501.UpdateStepAndRelatedTableData_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1501.ExecuteResponses_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1501.HandleEventWithxRecOnKnownWorkflowInstance_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1501.HandleEventWithxRecOnKnownWorkflowInstance(NavCode functionName, NavVariant variant, NavVariant xVariant, Guid workflowStepInstanceID)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1501.HandleEventOnKnownWorkflowInstance_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1501.HandleEventOnKnownWorkflowInstance(NavCode functionName, NavVariant variant, Guid workflowStepInstanceID)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1501.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1520.RunWorkflowOnApproveApprovalRequest_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Dynamics.Nav.EventSubscription.NavEventScope.CallEventSubscriber(NavEventSubscription subscriber, NavCodeunit subscriberCodeunitInstance, Object[] parameters)
at Microsoft.Dynamics.Nav.EventSubscription.NavEventScope.ProcessCallToAllSubscribers(NavApplicationObjectBase callerApplicationObject, PrepareParametersCallBack prepareParameters)

Answers

  • xgoalxgoal Member Posts: 4
    Continuation of event log:

    at Filter.InvokeWithFilter(NavMethodScope )
    at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1535.ApproveSelectedApprovalRequest_Scope.OnRun()
    at Filter.InvokeWithFilter(NavMethodScope )
    at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1535.ApproveApprovalRequests_Scope.OnRun()
    at Filter.InvokeWithFilter(NavMethodScope )
    at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1535.ApproveRecordApprovalRequest_Scope.OnRun()
    at Filter.InvokeWithFilter(NavMethodScope )
    at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1535.ApproveRecordApprovalRequest(NavRecordId recordID)
    at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1535.OnInvoke(Int32 memberId, Object[] args)
    at Filter.InvokeWithFilter(NavMethodScope )
    at Microsoft.Dynamics.Nav.BusinessApplication.Page189.Approve_a45_OnAction()
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at Microsoft.Dynamics.Nav.Runtime.NavApplicationMethod.InvokeMethod(ITreeObject obj, String methodName, Object[] args)
    at Microsoft.Dynamics.Nav.Runtime.NavForm.RaiseOnAction(String actionName, String actionTriggerMethodName)
    at Microsoft.Dynamics.Nav.Service.NSField.ActionField(NavSession con)
    at Microsoft.Dynamics.Nav.Service.NSField.Action(NavSession session)
    at SyncInvokeActionField(Object , Object[] , Object[] )
    at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
    at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.ErrorMappingCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
    at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.PushPopCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
    at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass1.<PerformanceCounterCombinator>b__0()
    at Microsoft.Dynamics.Nav.Runtime.NavPerformanceCounterSetter.UpdatePerformanceCountersWithAverageServiceOperationDuration(Stopwatch stopWatch, Action action)
    at Microsoft.Dynamics.Nav.Runtime.NavPerformanceCounterSetter.UpdatePerformanceCountersWithAverageServiceOperationAction(Action action, NavSession session)
    at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.PerformanceCounterCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
    at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
    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.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    at Microsoft.Dynamics.Nav.Types.Channels.ReceiveCorrelator.AsyncResult.Complete(Action setValue)
    at Microsoft.Dynamics.Nav.Types.Channels.ReceiveCorrelator.OnNewMessage(IAsyncResult ar)
    at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
    at System.Runtime.InputQueue`1.AsyncQueueReader.Set(Item item)
    at System.Runtime.InputQueue`1.Dispatch()
    at System.ServiceModel.Channels.ReliableDuplexSessionChannel.ProcessDuplexMessage(WsrmMessageInfo info)
    at System.ServiceModel.Channels.ServerReliableDuplexSessionChannel.ProcessMessage(WsrmMessageInfo info)
    at System.ServiceModel.Channels.ReliableDuplexSessionChannel.HandleReceiveComplete(IAsyncResult result)
    at System.ServiceModel.Channels.ReliableDuplexSessionChannel.OnReceiveCompletedStatic(IAsyncResult result)
    at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
    at System.ServiceModel.Channels.ReliableChannelBinder`1.InputAsyncResult`1.OnInputComplete(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.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
    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.ServiceModel.Channels.SocketConnection.OnReceiveAsync(Object sender, SocketAsyncEventArgs eventArgs)
    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)
    HResult: -2146233088
  • xgoalxgoal Member Posts: 4
    And the last part of event log:

    Type: System.Data.SqlClient.SqlException
    ClientConnectionId: 73166826-1c3f-4379-984c-9fcffe79aed1
    Class: 16
    LineNumber: 1
    Number: 3971
    Server: SQLSERVER
    State: 1
    Source: .Net SqlClient Data Provider
    ErrorCode: -2146232060
    Message: The server failed to resume the transaction. Desc:4900000c33.
    StackTrace:
    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.SqlDataReader.TryConsumeMetaData()
    at System.Data.SqlClient.SqlDataReader.get_MetaData()
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
    at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteFunction[T](Func`1 function, NavSqlCommand command)
    HResult: -2146232060
  • xgoalxgoal Member Posts: 4
    One more detail: in some instances the error message is different while call stack is the same.

    Message: New request is not allowed to start because it should come with valid transaction descriptor.
Sign In or Register to comment.