web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Answered

D365FO db synch error on deployable package: An exception was encountered while initializing chain of command initializer

(0) ShareShare
ReportReport
Posted on by 50

Hi Everyone

I have a strange error in D365FO during the db synch step of applying a deployable package via LCS.

Full detail from the dbsync.log can be found below, the main error points me to the event log but I cannot see anything helpful there.

Any help or advice you have will be very much appreciated

Thanks

Paul

09/28/2017 10:11:21: Bindir: K:\AosService\PackagesLocalDirectory
MetadataDir: K:\AosService\PackagesLocalDirectory
Sql scripts:

09/28/2017 10:11:21: Setup mode is "servicesync".
09/28/2017 10:11:23: Getting Compatibilty Level for Database 'AxDB'. Command: SELECT compatibility_level from sys.databases where name='AxDB';
09/28/2017 10:11:23: Compatibilty Level for Database 'AxDB' is: 130
09/28/2017 10:11:23: Compatibility level '130' meets minimum required level '130'. Skipping compitability level configuration for Database 'AxDB'
09/28/2017 10:11:23: 2017-09-28T10:11:23.1625393+00:00 Beginning sync step: InitialSchema.
09/28/2017 10:11:30: 2017-09-28T10:11:30.8997469+00:00 InitialSchema finished. Time elapsed: 00:07:735.
09/28/2017 10:11:30: Using legacy ids where possible.
09/28/2017 10:11:30: 2017-09-28T10:11:30.8997469+00:00 Beginning sync step: FullIds.
09/28/2017 10:11:46: 2017-09-28T10:11:46.5405636+00:00 FullIds finished. Time elapsed: 00:15:634.
09/28/2017 10:11:46: 2017-09-28T10:11:46.5405636+00:00 Beginning sync step: PreTableViewSyncActions.
09/28/2017 10:11:46: 2017-09-28T10:11:46.5405636+00:00 Beginning sync step: pre-sync custom action: '<RunFullSync>b__1'.
09/28/2017 10:12:19: 2017-09-28T10:12:19.1133237+00:00 pre-sync custom action: '<RunFullSync>b__1' finished. Time elapsed: 00:32:571.
09/28/2017 10:12:19: 2017-09-28T10:12:19.1133237+00:00 PreTableViewSyncActions finished. Time elapsed: 00:32:571.
09/28/2017 10:12:19: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: An exception was encountered while initializing chain of command initializer, see event viewer for the detailed information
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)
at Microsoft.Dynamics.AX.AOS.Startup()
at Microsoft.Dynamics.AX.AosConfig.?A0xb6e2c260.GetAosConfig()
at Microsoft.Dynamics.AX.AosConfig.Config.InitInternal(Boolean isOfflineMode)
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.StartAosCode(SyncOptions syncOptions, String sqlConnectionString)
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler)
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunCustomAction(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Action`1 a)
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.PreTableSync()
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullSync()
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync(SyncOptions options)
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
09/28/2017 10:12:19: Inner Exception: System.InvalidOperationException: An exception was encountered while initializing chain of command initializer, see event viewer for the detailed information
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.InitializeMetadataChainOfCommand()
09/28/2017 10:12:19: The operation failed.

*This post is locked for comments

I have the same question (0)
  • PaulDevey Profile Picture
    50 on at

    Thank you for your reponse.  I just double checked.

    We are on platform update 10 and the dev box has all SQL components at version 13.1.4xxx or higher.

  • Verified answer
    Mea_ Profile Picture
    60,284 on at

    Do you have all standard models in that deployable package or just 1 with you customizations\extensions? Because to use CoC you need to recompile all the code once, so if you deploying only your models this could be an issues.

  • Verified answer
    PaulDevey Profile Picture
    50 on at

    Thank you Ievgen

    Your information lead our developer to find that most important information on the CoC Docs site and solve the error reported:

    "The functionality that is described in this topic (CoC and access to protected methods and variables) is available in Microsoft Dynamics 365 Unified Operations Platform update 9. However, the class that is being augmented must also be compiled on Platform update 9 or later. As of August 2017, all current releases of the applications for Microsoft Dynamics 365 for Finance and Operations, Enterprise edition, have been compiled on Platform update 8 or earlier. Therefore, to wrap a method that is defined in a base package (such as Application Suite), you must recompile that base package on Platform update 9 or later. As an example: If you create your own extension model that is augmenting a class that exists in the Application Suite model, and if you are using CoC or accessing protected methods/variables, you will need to build both Application Suite and your extension model. You will also need to create a deployable package that includes both models in order to deploy this functionality on a runtime environment. This is a temporary situation until the next release of the Microsoft Dynamics 365 for Finance and Operations application."

    docs.microsoft.com/.../method-wrapping-coc

  • Community Member Profile Picture
    on at

    Hi Paul and Ievgen,

    We ran into a similar error as above, and I have made sure to create a deployable package which includes the Custom Model + App Suite. But still, no luck, When we try to apply the combined deployable package to our UAT environment. We did a manual synch in our UAT environment, but having the same error.

    Would you be able to throw any light please?

    Cheers

    Dilip

  • Mea_ Profile Picture
    60,284 on at

    Did you try to deploy extension model and all referenced models, not only app suite ?

  • Suggested answer
    Community Member Profile Picture
    on at

    Thanks Ievgen. Yes, I had to create a deployable package for all the models (excluding DemoDataSuite)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans