Hi guys, I recently moved to an update 10 environment in Finance and Operations,
and I'm working in extending forms, tables and classes that are currently customized.
I've been using the new CoC feature introduced in U9 to extend tables and classes functionalities, but I came accross this error when trying to synchronize the database:
Full error text:
Error at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 0
Error at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.InitializeMetadataChainOfCommand() 0
Error at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body) 0
Error at System.Lazy`1.get_Value() 0
Error at System.Lazy`1.CreateValue() 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullTableViewSync() 0
Error at Microsoft.Dynamics.AX.AosConfig.?A0xb6e2c260.GetAosConfig() 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.StartAosCode(SyncOptions syncOptions, String sqlConnectionString) 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullSync() 0
Error at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.CreateCatalogMetadataChainOfCommand() 0
Error at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) 0
Error at Microsoft.Dynamics.AX.AOS.StartupInternal(String[] Arguments) 0
Error at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 0
Error at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally) 0
Error --- End of inner exception stack trace --- 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullTableSync(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider) 0
Error at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) 0
Error at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) 0
Error Inner Exception: System.TypeLoadException: Could not load type 'Dynamics.AX.Application.ChainOfCommand.ChainOfCommandInitializeClass' from assembly 'Dynamics.AX.ApplicationSuite, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the parent does not exist. 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler) 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync(SyncOptions options) 0
Error at System.Reflection.RuntimeModule.GetType(RuntimeModule module, String className, Boolean ignoreCase, Boolean throwOnError, ObjectHandleOnStack type) 0
Error System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> System.TypeLoadException: Could not load type 'Dynamics.AX.Application.ChainOfCommand.ChainOfCommandInitializeClass' from assembly 'Dynamics.AX.ApplicationSuite, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the parent does not exist. 0
Error at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) 0
Error at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object ) 0
Error at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 0
Error at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.<>c__DisplayClass56_0.<CreateCatalogMetadataChainOfCommand>b__0(Assembly assembly) 0
Error at Microsoft.Dynamics.AX.AOS.Startup() 0
Error at Microsoft.Dynamics.AX.AosConfig.Config.InitInternal(Boolean isOfflineMode) 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options) 0
Error at System.Reflection.RuntimeModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase) 0
Error Inner Exception: System.AggregateException: One or more errors occurred. ---> System.TypeLoadException: Could not load type 'Dynamics.AX.Application.ChainOfCommand.ChainOfCommandInitializeClass' from assembly 'Dynamics.AX.ApplicationSuite, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the parent does not exist. 0
Error --- End of stack trace from previous location where exception was thrown --- 0
Error at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 0
Error ---> (Inner Exception #0) System.TypeLoadException: Could not load type 'Dynamics.AX.Application.ChainOfCommand.ChainOfCommandInitializeClass' from assembly 'Dynamics.AX.ApplicationSuite, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the parent does not exist. 0
Error at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<--- 0
Error at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() 0
Error syncengine.exe exited with code -1. 1
Here's the detailed description from the event viewer regarding this error:
AX is shutting down due to an error. Aos startup failed, allowing w3wp to terminate execution. Exception details: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> System.TypeLoadException: Could not load type 'Dynamics.AX.Application.ChainOfCommand.ChainOfCommandInitializeClass' from assembly 'Dynamics.AX.ApplicationSuite, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the parent does not exist. at System.Reflection.RuntimeModule.GetType(RuntimeModule module, String className, Boolean ignoreCase, Boolean throwOnError, ObjectHandleOnStack type) at System.Reflection.RuntimeModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase) at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.<>c__DisplayClass56_0.<CreateCatalogMetadataChainOfCommand>b__0(Assembly assembly) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object ) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body) at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.CreateCatalogMetadataChainOfCommand() at System.Lazy`1.CreateValue() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Lazy`1.get_Value() at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.InitializeMetadataChainOfCommand() --- End of inner exception stack 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.AOS.StartupInternal(String[] Arguments)
I've already tried building the package and its referenced packages, and it compiled succesfully, but when I try to do a DB synch I always get this error.
The model was originally migrated from an Update 7 environment with the ModelUtil tool. When I tried deleting the model from the environment in Update 10, the synch ran without any problems.
Any idea on why this might be happening?
Thanks!