Hi experts,
I am getting TMS exception error some time at the time of rate route for a load from AIF service request and its crashing Ax service, However after second request for rate route for same load working fine and creating shipment, packing slip and invoice,
Here is not big issue to resend the request but problem is that its crashing my AOS and service getting restarting when this TMS exception occur
Here is Stack from Transportation system error log
Exception at level 0Message: Unexpected error occurred when processing the request., TMSExceptionSource: Microsoft.Dynamics.Ax.TmsStack trace: at Microsoft.Dynamics.Ax.Tms.API.TmsService.ExecuteTransaction(String requestXml) at Dynamics.Ax.Application.TMSCommProxy.Sendrequest(String _xml) in TMSCommProxy.sendRequest.xpp:line 20Exception at level 1Message: Exception has been thrown by the target of an invocation.Source: mscorlibStack trace: 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.AX.ManagedInterop.CReflectionCallHelper.CallXppObjectMethodinIL(Object pILXppInstance, String strMethod, Object[] pParamList) at Microsoft.Dynamics.AX.ManagedInterop.Record.CallWrapper(String strMethod, Boolean checkKeys, UInt16 dwSecKey, Byte accessType, Object[] pParamList) at Microsoft.Dynamics.AX.ManagedInterop.Record.setFieldValue(Int32 fieldId, Object value) at lambda_method(Closure , ProjectionRow , AXQueryProvider ) at Microsoft.Dynamics.AX.Framework.Linq.Data.AxProjectionReader`1.Enumerator.MoveNext() at System.Linq.Enumerable.<JoinIterator>d__38`4.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Microsoft.Dynamics.Ax.Tms.Data.TmsDataService.GetRatingDtosList(String inventoryLocationId, String inventSiteId, Nullable`1 scheduledShipDate) at Microsoft.Dynamics.Ax.Tms.Data.TmsDataService.GetRatingDtos(TransactionFacade transactionFacade, Nullable`1 scheduledShipDate) at Microsoft.Dynamics.Ax.Tms.Bll.RoutingService.RetrieveRatingDto(TransactionFacade transactionFacade, String carrierCode, String carrierServiceCode, Nullable`1 scheduledShipDate) at Microsoft.Dynamics.Ax.Tms.Bll.RoutingService.RateSegmentConfiguration(TransactionFacade transactionFacade, XElement segment, TMSRouteSegmentConfig routeSegmentConfig, Boolean isChargeOverride) at Microsoft.Dynamics.Ax.Tms.Bll.RouteEngine.CreateStaticRouteSegments(TransactionFacade transactionFacade, TMSRouteConfig routeConfig, XElement shipmentTemplate, Boolean isChargeOverride) at Microsoft.Dynamics.Ax.Tms.Bll.RouteEngine.CreateRoute(TransactionFacade transactionFacade, XElement se, TMSRouteGuide routeGuide, String routeConfigurationCode) at Microsoft.Dynamics.Ax.Tms.Bll.RouteEngine.ProcessShipment(TransactionFacade transactionFacade, XElement se) at Microsoft.Dynamics.Ax.Tms.Bll.RouteEngine.Route(TransactionFacade transactionFacade) at Microsoft.Dynamics.Ax.Tms.Bll.RateRouteBroker.Execute(TransactionFacade transactionFacade) at Microsoft.Dynamics.Ax.Tms.API.TmsService.ExecuteTransaction(String requestXml)Exception at level 2Message: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.Source: Ax32ServStack trace: at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue) at Microsoft.Dynamics.Ax.MSIL.cqlCursorIL.setFieldValue(IntPtr table, String _fieldName, Object _value, Int32 _arrayIndex) at TMSCarrier::setFieldValueWithFieldId(Object , Object[] ) at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters) at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelperMIL.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)
-----------------And below is the stack from event viewer of the ax server at the same time and service restarted
Application: Ax32Serv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
at <Module>.cqlCursorIL_Native.getFieldValue(cqlCursor*, Char*)
at Microsoft.Dynamics.Ax.MSIL.cqlCursorIL.getFieldValue(IntPtr, System.String)
at Microsoft.Dynamics.Ax.Xpp.Common.getFieldValue(System.String)
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(System.Object, System.String, System.Object[])
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelperMIL.MakeInstanceCall(System.Object, System.String, System.Object[])
Exception Info: System.Reflection.TargetInvocationException
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at Microsoft.Dynamics.AX.ManagedInterop.CReflectionCallHelper.CallXppObjectMethodinIL(System.Object, System.String, System.Object[])
at Microsoft.Dynamics.AX.ManagedInterop.Record.CallWrapper(System.String, Boolean, UInt16, Byte, System.Object[])
at Microsoft.Dynamics.AX.ManagedInterop.Record.get_Field(System.String)
at Microsoft.Dynamics.Ax.Tms.TMSRatingProfile.get_TransitTimeEngineCode()
at Microsoft.Dynamics.Ax.Tms.Data.TmsDataService+<>c__DisplayClass35.<GetRatingDtosList>b__31(System.Tuple`2<Microsoft.Dynamics.Ax.Tms.TMSCarrier,Microsoft.Dynamics.Ax.Tms.TMSCarrierService>, Microsoft.Dynamics.Ax.Tms.TMSRatingProfile)
at System.Linq.Enumerable+<JoinIterator>d__38`4[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
at Microsoft.Dynamics.Ax.Tms.Data.TmsDataService.GetRatingDtosList(System.String, System.String, System.Nullable`1<System.DateTime>)
at Microsoft.Dynamics.Ax.Tms.Data.TmsDataService.GetRatingDtos(Microsoft.Dynamics.Ax.Tms.Bll.TransactionFacade, System.Nullable`1<System.DateTime>)
at Microsoft.Dynamics.Ax.Tms.Bll.RoutingService.RetrieveRatingDto(Microsoft.Dynamics.Ax.Tms.Bll.TransactionFacade, System.String, System.String, System.Nullable`1<System.DateTime>)
at Microsoft.Dynamics.Ax.Tms.Bll.RoutingService.RateSegmentConfiguration(Microsoft.Dynamics.Ax.Tms.Bll.TransactionFacade, System.Xml.Linq.XElement, Microsoft.Dynamics.Ax.Tms.TMSRouteSegmentConfig, Boolean)
at Microsoft.Dynamics.Ax.Tms.Bll.RouteEngine.CreateStaticRouteSegments(Microsoft.Dynamics.Ax.Tms.Bll.TransactionFacade, Microsoft.Dynamics.Ax.Tms.TMSRouteConfig, System.Xml.Linq.XElement, Boolean)
at Microsoft.Dynamics.Ax.Tms.Bll.RouteEngine.CreateRoute(Microsoft.Dynamics.Ax.Tms.Bll.TransactionFacade, System.Xml.Linq.XElement, Microsoft.Dynamics.Ax.Tms.TMSRouteGuide, System.String)
at Microsoft.Dynamics.Ax.Tms.Bll.RouteEngine.ProcessShipment(Microsoft.Dynamics.Ax.Tms.Bll.TransactionFacade, System.Xml.Linq.XElement)
at Microsoft.Dynamics.Ax.Tms.Bll.RouteEngine.Route(Microsoft.Dynamics.Ax.Tms.Bll.TransactionFacade)
at Microsoft.Dynamics.Ax.Tms.Bll.RateRouteBroker.Execute(Microsoft.Dynamics.Ax.Tms.Bll.TransactionFacade)
at Microsoft.Dynamics.Ax.Tms.API.TmsService.ExecuteTransaction(System.String)
at Dynamics.Ax.Application.TMSCommProxy.Sendrequest(System.String)
at Dynamics.Ax.Application.TMSProcessXML_Base.Execute()
at Dynamics.Ax.Application.WCL_DMS_UtilitiClass.Rateroute(Dynamics.Ax.Application.WHSLoadTable)
at Dynamics.Ax.Application.WCL_DMS_UtilitiClass.Raterouteworkbench(Dynamics.Ax.Application.WHSLoadTable)
at Dynamics.Ax.Application.WCL_DMS_UtilitiClass.Shipmentcreationforsoandto(System.String, System.Decimal, System.String, System.String, System.String, Microsoft.Dynamics.Ax.Xpp.AxShared.Date, System.String, System.String)
at Dynamics.Ax.Application.WCL_DMS_UtilitiClass.Finalshipmentcreation(System.String, System.String, System.String, System.Decimal, System.String, System.String, System.String, Microsoft.Dynamics.Ax.Xpp.AxShared.Date, System.String, System.String, System.String)
at Dynamics.Ax.Application.WCL_DMS_UtilitiClass.Finaldepotdespatchprocessing(System.String, System.String, System.String, System.Decimal, System.String, System.String, Microsoft.Dynamics.Ax.Xpp.AxShared.Date, System.String, System.String, Microsoft.Dynamics.Ax.Xpp.AxShared.Date, System.String, System.String)
at Dynamics.Ax.Application.WCL_BK_OrderShipmentProcessing.Finalsalesordershipment(System.String, System.String, System.String, System.Decimal, System.String, System.String, Microsoft.Dynamics.Ax.Xpp.AxShared.Date, System.String, System.String, Microsoft.Dynamics.Ax.Xpp.AxShared.Date, System.String, System.String)
at Microsoft.Dynamics.Ax.Services.eSamparkOrderShipmentHandlingGroup.Microsoft.Dynamics.Ax.Services.eSamparkOrderShipmentHandling.Finalsalesordershipment(Microsoft.Dynamics.Ax.Services.eSamparkOrderShipmentHandlingFinalSalesOrderShipmentRequest)
at DynamicClass.SyncInvokeFinalsalesordershipment(System.Object, System.Object[], System.Object[])
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(System.Object, System.Object[], System.Object[] ByRef)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(System.ServiceModel.Dispatcher.MessageRpc ByRef)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(System.ServiceModel.Dispatcher.MessageRpc ByRef)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(System.ServiceModel.Dispatcher.MessageRpc ByRef)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean)
at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(System.ServiceModel.Channels.RequestContext, Boolean, System.ServiceModel.OperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(System.ServiceModel.Channels.RequestContext, System.ServiceModel.OperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(System.IAsyncResult)
at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(System.IAsyncResult)
at System.Runtime.Fx+AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult)
at System.Runtime.AsyncResult.Complete(Boolean)
at System.ServiceModel.Channels.TransportDuplexSessionChannel+TryReceiveAsyncResult.OnReceive(System.IAsyncResult)
at System.Runtime.Fx+AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult)
at System.Runtime.AsyncResult.Complete(Boolean)
at System.ServiceModel.Channels.SynchronizedMessageSource+ReceiveAsyncResult.OnReceiveComplete(System.Object)
at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(System.Object)
at System.Runtime.Fx+AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult)
at System.Net.LazyAsyncResult.Complete(IntPtr)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr)
at System.Net.Security.NegotiateStream.ProcessFrameBody(Int32, Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)
at System.Net.Security.NegotiateStream.ReadCallback(System.Net.AsyncProtocolRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32)
at System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult)
at System.Runtime.AsyncResult.Complete(Boolean)
at System.ServiceModel.Channels.ConnectionStream+IOAsyncResult.OnAsyncIOComplete(System.Object)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(System.Net.Sockets.SocketAsyncEventArgs)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(System.Net.Sockets.SocketError, Int32, System.Net.Sockets.SocketFlags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)