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 :
Finance | Project Operations, Human Resources, ...
Answered

Dev environment database sync problem

(0) ShareShare
ReportReport
Posted on by

Hi all.

In my dev environment ( cloud hosted) I get database sync errors. I have no clue why, my model builds just fine..

My version is:
Application release
Microsoft Dynamics 365 for Finance and Operations (10.0.18)
Platform release
Update42 (7.0.5968.17016)

I get a  list of 213 errors on tables that I did not change. I get something like this:

0842.Capture4.JPG

Full build started 05/30/2021 20:20.
Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: 'CredManRiskValueDSO(21720)' Exception: Microsoft.Dynamics.Ax.Xpp.ClrErrorException: InvalidOperationException ---> System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Microsoft.Dynamics.Ax.Xpp.Metadata.StaticMetadataInitializer.RegisterMappings(CommonHandle tableHandle, IEnumerable`1 mappings, Boolean isForMap)
at Microsoft.Dynamics.Ax.Xpp.Metadata.MapHandleInitializer.ProcessMappings(CommonHandle commonHandle)
at Microsoft.Dynamics.Ax.Xpp.Metadata.StaticMetadataInitializer.CreateHandle(IMetadataSupport metadataSupport)
at Microsoft.Dynamics.Ax.Xpp.Metadata.TableHandleInitializer.ProcessMappings(CommonHandle commonHandle)
at Microsoft.Dynamics.Ax.Xpp.ManagedCommonImplementation..ctor(Common common)
at Microsoft.Dynamics.Ax.Xpp.CommonImplementationHelper.CreateCommonImplementation(Common common)
at Microsoft.Dynamics.Ax.Xpp.Common..ctor(Int32 tableId)
at Dynamics.AX.Application.CustTable..ctor()
at CustTable::CustTable(Object[] , Boolean& )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeNewObjCall(Type type, Object[] parameters)
--- End of inner exception stack trace ---
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeNewTableObj(String tableName, Object args)
at Dynamics.AX.Application.ManagedQueryBuildDataSourceImplementation.<get_Record>b__58_0()
at Microsoft.Dynamics.AX.Data.Core.Helper.GeneralHelpers.ReturnOrCreate[T](T& field, Func`1 construct)
at Dynamics.AX.Application.ManagedQueryBuildDataSourceImplementation.get_Record()
at Dynamics.AX.Application.ManagedQueryBuildDataSourceImplementation.addDataSource(Object _arg, String _name, Boolean _emptyFieldList)
at Dynamics.AX.Application.ManagedQueryBuildDataSourceImplementation.InitializeFromMetadata(AxQuerySimpleDataSource axDataSource, QueryDataSourceResolver resolver, List`1 pairs)
at Dynamics.AX.Application.RootQueryBuildDataSourceImplementation.InitializeFromMetadata(AxQuerySimpleDataSource axDataSource, QueryDataSourceResolver resolver, List`1 pairs)
at Dynamics.AX.Application.QueryBuilder.NewQueryFromAxQuerySimple(Query query, AxQuerySimple axQuery)
at Dynamics.AX.Application.QueryBuilder.NewQueryFromAxQuery(AxQuery axQuery, Boolean generateOnlyForView)
at Dynamics.AX.Application.ManagedQueryImplementation.NewQueryFromObject(Query newQuery, Object source)
at Dynamics.AX.Application.QueryImplementation.CreateImplementation(Query parent, Object _source)
at Dynamics.AX.Application.Query..ctor(Object _source)
at Microsoft.Dynamics.AX.Data.Management.ManagedSyncViewDDLBuilder.GenerateSelectQueryFromSyncObject(AxView view)
at Microsoft.Dynamics.AX.Data.Management.ManagedSyncDDLBuilder`1.GenerateStatement(T syncObject, Func`2 selectQueryGenerator)
at Microsoft.Dynamics.AX.Data.Management.DataEntity.ManagedSyncDataEntityWorker.SyncAllAction[T](ViewSyncGraphNode viewToSync, Dictionary`2 oldViewDefinitions, StringCollection dataEntityViewList, StringCollection compositeEntityViewList, IProducerConsumerCollection`1 modifiedViewDependencies)
at Microsoft.Dynamics.AX.Data.Management.DataEntity.ManagedSyncDataEntityWorker.DoSyncAll[T](IEnumerable`1 sortedViewList, Dictionary`2 oldViewDefinitions, IProducerConsumerCollection`1 modifiedViewDependencies)
Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: 'CredManCustTableCreditLimitTableView(21793)' Exception: Microsoft.Dynamics.Ax.Xpp.ClrErrorException: InvalidOperationException ---> System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.
--- End of stack trace from previous location where exception was thrown ---

Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: 'PayPredProjectedCustomerInvoiceView(21441)' Exception: Microsoft.Dynamics.Ax.Xpp.ClrErrorException: InvalidOperationException ---> System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.
Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: 'PayPredOpenCustomerInvoicesView(22572)' Exception: Microsoft.Dynamics.Ax.Xpp.ClrErrorException: InvalidOperationException ---> System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.
Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: 'PayPredPostedCustomerInvoiceView(21660)' Exception: Microsoft.Dynamics.Ax.Xpp.ClrErrorException: InvalidOperationException ---> System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    1) What cjanges did you do in the system after it still worked without issues?

    2) Can you build your models without errors? If not, forget the sync until you have done a succesful build. 

  • FlorinF Profile Picture
    on at

    Hi Nikolaos,

    I did not do anything special. I created extensions to some standard DataEntity. The model compiles ok.

    Even if I compile my model with reference packages I get the same errors at sync

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Anf if you remove those entity extensions, does the problem go away?

  • FlorinF Profile Picture
    on at

    I've removed the data entity extensions but I get the same issue. This environment was working fine, I do not know what is changed. The errors are from objects that I did not touch.

    6811.Capture4.JPG

  • FlorinF Profile Picture
    on at

    At the end of the sync log I get this:

    AOS database sync failed. Microsoft.Dynamics.AX.Framework.Database.TableSyncException: AOS database sync failed. Microsoft.Dynamics.AX.Framework.Database.TableSyncException: Full sync did not complete successfully. Error: AggregateException:One or more errors occurred.

       at Microsoft.Dynamics.AX.Data.Management.ManagedSyncWorkerManager.SyncAll()

       at Microsoft.Dynamics.AX.Data.Management.ManagedSync.<SyncAll>b__21_0()

       at Microsoft.Dynamics.AX.Data.Management.ManagedSync.EnsureMetadataProviderCacheCleared(Action action)

       at Microsoft.Dynamics.AX.Data.Management.ManagedSync.SyncAll()

       at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullManagedSync(SyncOptions options, String sqlConnectionString, IMetadataProvider metadataProvider)

       at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c__DisplayClass20_0.<RunFullTableSync>b__0()

       at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler)

    Inner exceptions:

    ClrErrorException:InvalidOperationException

    Inner exception:

    InvalidOperationException:ValueFactory attempted to access the Value property of this instance.

       at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeNewObjCall(Type type, Object[] parameters).

       at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c.<RunFullTableSync>b__20_1(Tuple`2 result)

       at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullTableSync(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider)

       at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullTableViewSync()

       at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullSync()

       at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync()

       at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)

     Process: syncengine.exe exited with code -1.

    Full build completed (343970 ms).

  • FlorinF Profile Picture
    on at

    And the first error in the log is:

    Full build started 05/30/2021 22:17.

     Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: 'CredManRiskValueDSO(21720)' Exception: Microsoft.Dynamics.Ax.Xpp.ClrErrorException: InvalidOperationException ---> System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.

       at System.Lazy`1.CreateValue()

       at System.Lazy`1.LazyInitValue()

       at Microsoft.Dynamics.Ax.Xpp.Metadata.StaticMetadataInitializer.RegisterMappings(CommonHandle tableHandle, IEnumerable`1 mappings, Boolean isForMap)

       at Microsoft.Dynamics.Ax.Xpp.Metadata.MapHandleInitializer.ProcessMappings(CommonHandle commonHandle)

       at Microsoft.Dynamics.Ax.Xpp.Metadata.StaticMetadataInitializer.CreateHandle(IMetadataSupport metadataSupport)

       at Microsoft.Dynamics.Ax.Xpp.Metadata.TableHandleInitializer.ProcessMappings(CommonHandle commonHandle)

       at Microsoft.Dynamics.Ax.Xpp.ManagedCommonImplementation..ctor(Common common)

       at Microsoft.Dynamics.Ax.Xpp.CommonImplementationHelper.CreateCommonImplementation(Common common)

       at Microsoft.Dynamics.Ax.Xpp.Common..ctor(Int32 tableId)

       at Dynamics.AX.Application.CustTable..ctor()

       at CustTable::CustTable(Object[] , Boolean& )

       at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeNewObjCall(Type type, Object[] parameters)

       --- End of inner exception stack trace ---

       at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeNewTableObj(String tableName, Object args)

       at Dynamics.AX.Application.ManagedQueryBuildDataSourceImplementation.<get_Record>b__58_0()

       at Microsoft.Dynamics.AX.Data.Core.Helper.GeneralHelpers.ReturnOrCreate[T](T& field, Func`1 construct)

       at Dynamics.AX.Application.ManagedQueryBuildDataSourceImplementation.get_Record()

       at Dynamics.AX.Application.ManagedQueryBuildDataSourceImplementation.addDataSource(Object _arg, String _name, Boolean _emptyFieldList)

       at Dynamics.AX.Application.ManagedQueryBuildDataSourceImplementation.InitializeFromMetadata(AxQuerySimpleDataSource axDataSource, QueryDataSourceResolver resolver, List`1 pairs)

       at Dynamics.AX.Application.RootQueryBuildDataSourceImplementation.InitializeFromMetadata(AxQuerySimpleDataSource axDataSource, QueryDataSourceResolver resolver, List`1 pairs)

       at Dynamics.AX.Application.QueryBuilder.NewQueryFromAxQuerySimple(Query query, AxQuerySimple axQuery)

       at Dynamics.AX.Application.QueryBuilder.NewQueryFromAxQuery(AxQuery axQuery, Boolean generateOnlyForView)

       at Dynamics.AX.Application.ManagedQueryImplementation.NewQueryFromObject(Query newQuery, Object source)

       at Dynamics.AX.Application.QueryImplementation.CreateImplementation(Query parent, Object _source)

       at Dynamics.AX.Application.Query..ctor(Object _source)

       at Microsoft.Dynamics.AX.Data.Management.ManagedSyncViewDDLBuilder.GenerateSelectQueryFromSyncObject(AxView view)

       at Microsoft.Dynamics.AX.Data.Management.ManagedSyncDDLBuilder`1.GenerateStatement(T syncObject, Func`2 selectQueryGenerator)

       at Microsoft.Dynamics.AX.Data.Management.DataEntity.ManagedSyncDataEntityWorker.SyncAllAction[T](ViewSyncGraphNode viewToSync, Dictionary`2 oldViewDefinitions, StringCollection dataEntityViewList, StringCollection compositeEntityViewList, IProducerConsumerCollection`1 modifiedViewDependencies)

       at Microsoft.Dynamics.AX.Data.Management.DataEntity.ManagedSyncDataEntityWorker.DoSyncAll[T](IEnumerable`1 sortedViewList, Dictionary`2 oldViewDefinitions, IProducerConsumerCollection`1 modifiedViewDependencies)

     Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: 'CredManCustTableCreditLimitTableView(21793)' Exception: Microsoft.Dynamics.Ax.Xpp.ClrErrorException: InvalidOperationException ---> System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.

    --- End of stack trace from previous location where exception was thrown ---

       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

       at System.Lazy`1.get_Value()

     Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: 'CredManRiskValueCustMetrics(22914)' Exception: Microsoft.Dynamics.Ax.Xpp.ClrErrorException: InvalidOperationException ---> System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.

       at Dynamics.AX.Application.ManagedQueryRunImplementation.next()

       at Dynamics.AX.Application.ManagedQueryRunImplementation.GenerateOnlyRunToNext(ManagedQueryImplementation query)

       at Dynamics.AX.Application.ManagedQueryRunImplementation.GetSQLSelectQuery(ManagedQueryImplementation query)

       at Microsoft.Dynamics.AX.Data.Management.ManagedSyncDDLBuilder`1.GenerateSelectQueryFromQuery(Query xppQuery)

     Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: Managed Data Sync Entity Worker encountered an exception, but is continuing because ContinueOnError is true. View Name and ID: 'FinancialReportingCustTransRowNumByVoucherTransDateView(66395)' Exception: Microsoft.Dynamics.Ax.Xpp.ClrErrorException: InvalidOperationException ---> System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.

       at Dynamics.AX.Application.ManagedQueryBuildDataSourceImplementation.get_TableDataSourceNode()

       at Dynamics.AX.Application.EmbeddedQueryBuildDataSourceImplementation.InitializeQueryStatement()

       at Dynamics.AX.Application.ManagedQueryBuildDataSourceImplementation.InitializeForQuerySelect(IDictionary`2 stmtQueryToRecordMap)

       at Dynamics.AX.Application.ManagedQueryImplementation.generateCursors()

       at Dynamics.AX.Application.ManagedQueryRunImplementation.GenerateCursors(ManagedQueryImplementation query)

       at Dynamics.AX.Application.ManagedQueryRunImplementation.InitializeForNext()

       at Dynamics.AX.Application.ManagedQueryRunImplementation.nextInternal()

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Hi

    if you feel it will take more than a few hours to solve the issue, I recommend deploying a new system. Especially if you're not sure what exact change caused it.

  • Suggested answer
    FlorinF Profile Picture
    on at

    I solved the problem. A map was placed in the maps node of a table extension. I don't know why it gave synchronization errors but if I remove that map, everything is ok

    0702.Untitled.png

  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Thanks for providing the answer how you solved your own issue. I have marked your answer as verified to set the status of your question to 'Answered'.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans