Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Management Reporter Integration error - Argument Exception - An item with the same key has already been added

Posted on by 5

Dear Members,

I have been facing this issue "Argument Exception - An item with the same key has already been added" during integration process in management reporter CU16 version from AX 2012 R3. I have mentioned the detailed log file below:

VERBOSE TID:TP-10 [2019-07-01T16:15:13.2540305+04:00]: [AX 2012 Dimension Combinations to Dimension Combination] with MapId [1e81959a-e167-490a-9b43-d0ded3d5a4b4] is searching for READ keys using 07/01/2019 12:14:00 as last change.
VERBOSE TID:TP-5 [2019-07-01T16:15:13.4415035+04:00]: [AX 2012 Accounts to Account] with MapId [acc589bf-6978-4451-b476-1c428473d860] is searching for DELETE keys using 01/01/1900 00:00:00 as last change.
VERBOSE TID:TP-5 [2019-07-01T16:15:13.4415035+04:00]: [AX 2012 Accounts to Account] DELETE returned no records to process.
VERBOSE TID:TP-5 [2019-07-01T16:15:13.4415035+04:00]: [AX 2012 Accounts to Account] with MapId [acc589bf-6978-4451-b476-1c428473d860] is searching for READ keys using 01/01/1900 00:00:00 as last change.
ERROR TID:TP-5 [2019-07-01T16:15:13.6133716+04:00]: An item with the same key has already been added.
--- Exception Dump --- 
Caught Exception: [System.ArgumentException] An item with the same key has already been added.
Stack trace:
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Dynamics.Integration.Adapters.AX2012GL.AccountObjectProvider.CreateWorkerDictionary(AX2012GLAdapter adapter)
at Microsoft.Dynamics.Integration.Adapters.AX2012GL.AccountObjectProvider.ReadObjectKeys(DateTime modifiedDate)
at Microsoft.Dynamics.Integration.AdapterAbstractionLayer.ReaderObjectProviderProxy.ReadObjectKeys(DateTime modifiedDate)
at Microsoft.Dynamics.Integration.Service.Tasks.MapWork.ReadObjectKeyList(String mapName, DbMap map, DateTime queryDate, Nullable`1& count, EventHandler onDone)
at Microsoft.Dynamics.Integration.Service.Tasks.MapWork.GetObjectKeys(String mapName, DbMap map, OperationType operationType, DateTime queryDate, Nullable`1& count, EventHandler onDone)
at Microsoft.Dynamics.Integration.Service.Tasks.MapWork.ProcessRecordsImplementation(OperationType operationType)

07/01/2019 12:15:13: task acc589bf-6978-4451-b476-1c428473d860 is Faulted
07/01/2019 12:15:13: task 1e81959a-e167-490a-9b43-d0ded3d5a4b4 is RanToCompletion
VERBOSE TID:TP-10 [2019-07-01T16:15:13.9258888+04:00]: Completed: 0 recor04:29 PM 01/07/2019d(s) have been written. 0 record(s) have been deleted. 0 record(s) have failed. 0 record(s) were filtered. Total runtime was 11 seconds.
VERBOSE TID:TP-11 [2019-07-01T16:15:14.7696496+04:00]: [AX 2012 Dimension Values to Dimension Value] with MapId [6e1e0edb-6728-4d2c-b837-bb0007cd6ec0] is searching for DELETE keys using 07/01/2019 12:10:01 as last change.
VERBOSE TID:TP-11 [2019-07-01T16:15:14.7852736+04:00]: [AX 2012 Dimension Values to Dimension Value] DELETE returned no records to process.

I would appreciate your thoughts to help me rectify this issue.

Thanks,

*This post is locked for comments

  • Verified answer
    Vidya D Profile Picture
    Vidya D 25 on at
    RE: Management Reporter Integration error - Argument Exception - An item with the same key has already been added

    Dear Ludwig,

    I finally managed to resolve this issue. I would like to post the resolution here as it would be helpful for others or for future reference. We used SQL Server profiler to identify the transactions executing during integration process. We found some details during integration were fetched using "HcmWorkerDetailsView" in AX 2012, which had a duplicate record for an employee(worker). We removed the duplicate record and the issue got resolved.

    Thanks,

    Vidya

  • Sharif Metals Profile Picture
    Sharif Metals 5 on at
    RE: Management Reporter Integration error - Argument Exception - An item with the same key has already been added

    Is there any tool to check AX data for MR ?

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Management Reporter Integration error - Argument Exception - An item with the same key has already been added

    Hi,

    I would recommend contacting the MS support in this case.

    Best regards

    Ludwig

  • Sharif Metals Profile Picture
    Sharif Metals 5 on at
    RE: Management Reporter Integration error - Argument Exception - An item with the same key has already been added

    I have separate MR installation for each server.  With latest cu16 updates

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Management Reporter Integration error - Argument Exception - An item with the same key has already been added

    Hi,

    Do you have separate MR installations for all of your machines? Trying to integrate different test / dev ... boxes on one single MR does usually not work.

    Best regards

    Ludwig

  • Sharif Metals Profile Picture
    Sharif Metals 5 on at
    RE: Management Reporter Integration error - Argument Exception - An item with the same key has already been added

    Hi

    Yes I have done both reset and search for hotfix . But no luck .

    We believe the issue due to some data from Ax as we restore the live transaction database to development server then the same issue start appearing in development where previously was not.

    We notice in the data mart that accouns types not updated in table and somr attributes type not coming.

    I am not sure if the reason could be changing the COA Structure or change some accounts type or even users

    Below part of the error trace

    Microsoft.Dynamics.Integration.Adapters.AX2012GL.AccountObjectProvider.CreateWorkerDictionary(AX2012GLAdapter adapter)

    It shows CreateWorkerDictionary

    Thanks

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Management Reporter Integration error - Argument Exception - An item with the same key has already been added

    Hi Sharif,

    Have you already reset the datamart and have you checked LCS for available hotfixes?

    Best regards

    Ludwig

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans