An item with the same key has already been added. (While Merging)
0
I’m Merging Mainline up to a Branch, as with most Merges it gets quite painful when you get a bunch of Conflicts. My Current process for resolving conflicts Microflows/Pages = Duplicate the Conflicted resource, click ‘Use theirs’ and then combine after, deleting the Duplicate. Domain models = ID Whats different, use one Domain model and then re-create whatever’s missing. I did all of this, resolved all Conflicts, then had a few last errors to sort. Most of the errors were due to ‘Resource not available’ Such as a Domain model entity, which in some places i re-named, in others I created it, as it wasn’t available. I’ve now got down to my final error, (Association no longer exists) which may be the issue in question here, but it won’t let me resolve the error because I get the following message. System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) I’ve read another post – https://forum.mendix.com/link/questions/90408 – That says I shouldn’t be re-creating the entity i should move it, but that was for combining modules I’m guessing as part of the same Branch. This is combining Main and a Branch with different code versions. And because of all the changes its hard to ID exactly which item is causing the problem. How do I go about tackling this? Where and what should I be looking for? Also I’m on Modeler version 7.21, It wasn’t available in the drop down Advanced Stacktrace for reference Mendix.Modeler.Utility.Progress.ProgressException ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Mendix.Modeler.DocumentTemplates.Documents.DocumentTemplate.<>c__DisplayClass78_0.<GetParameters>b__0(Widget widget) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.DocumentTemplates\Documents\DocumentTemplate.cs:line 413 at Mendix.Modeler.DocumentTemplates.Documents.Widgets.Grids.MxTemplateGrid.ForEachWidgetDo(Action`1 code) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.DocumentTemplates\Documents\Widgets\Grids\MxTemplateGrid.cs:line 93 at Mendix.Modeler.DocumentTemplates.Documents.DocumentTemplate.ForEachWidgetDo(Action`1 code) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.DocumentTemplates\Documents\DocumentTemplate.cs:line 426 at Mendix.Modeler.DocumentTemplates.Documents.DocumentTemplate.GetParameters() in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.DocumentTemplates\Documents\DocumentTemplate.cs:line 414 at Mendix.Modeler.DocumentTemplates.GenerateDocumentAction.GenerateDocumentAction.CheckParameterMappingUpToDate() in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.DocumentTemplates\GenerateDocumentAction\GenerateDocumentAction.cs:line 57 at Mendix.Modeler.DocumentTemplates.GenerateDocumentAction.GenerateDocumentAction.Check(IProblems problems) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.DocumentTemplates\GenerateDocumentAction\GenerateDocumentAction.cs:line 130 at Mendix.Modeler.Microflows.ActionActivity.Check(IProblems problems) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Microflows\FlowObjects\ActionActivity.cs:line 374 at Mendix.Modeler.Microflows.MicroflowBase.Check(IProblems problems) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Microflows\MicroflowBase.cs:line 352 at Mendix.Modeler.Microflows.Microflow.Check(IProblems problems) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Microflows\Microflows\Microflow.cs:line 149 at Mendix.Modeler.Utility.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Utility\EnumerableUtil.cs:line 150 at Mendix.Modeler.Common.ResolveCache.TrackResolves(Action code) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Common\Problems\ResolveCache.cs:line 67 at Mendix.Modeler.Projects.Checks.DocumentCheck.CheckDocument(IDocument document, IUsages usages) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Projects\Checks\DocumentCheck.cs:line 45 at Mendix.Modeler.Projects.Checks.DocumentCheck.Check(IProject project, ProjectChanges changes, IProblems problems) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Projects\Checks\DocumentCheck.cs:line 30 at Mendix.Modeler.Projects.Checks.ProjectChecker.<>c__DisplayClass5_1.<Check>b__0(ProjectChanges changes) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Projects\Checks\ProjectChecker.cs:line 54 at Mendix.Modeler.Projects.Checks.ChangedDocumentTracker.TryProcessChangesSync(Action`1 changeProcessor) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Projects\Checks\ChangedDocumentTracker.cs:line 35 at Mendix.Modeler.Projects.Checks.ProjectChecker.Check(IProject project) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Projects\Checks\ProjectChecker.cs:line 37 at Mendix.Modeler.Common.BackgroundCheckRunner.Check(IProject project) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Common\Problems\BackgroundCheckRunner.cs:line 103 at Mendix.Modeler.Common.BackgroundCheckRunner.<>c__DisplayClass5_0.<StartChecking>b__0() in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Common\Problems\BackgroundCheckRunner.cs:line 46 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Mendix.Modeler.Common.BackgroundCheckRunner.<Start>d__4.MoveNext() in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Common\Problems\BackgroundCheckRunner.cs:line 30 --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Mendix.Modeler.Common.BackgroundChecker.OnCheckComplete(Task`1 result) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Common\Problems\BackgroundChecker.cs:line 137 at System.Threading.Tasks.Task.Execute() --- 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 Mendix.Modeler.Common.BackgroundChecker.Check() in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Common\Problems\BackgroundChecker.cs:line 87 at Mendix.Modeler.UIFramework.Progress.ProgressUtil.<>c__DisplayClass2_0`1.<Do>b__0(IProgressInfo info) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.UIFramework\Progress\ProgressUtil.cs:line 44 at Mendix.Modeler.UIFramework.Progress.ProcessRunner.RunStep(Step step) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.UIFramework\Progress\ProcessRunner.cs:line 81 at Mendix.Modeler.UIFramework.Progress.ProcessRunner.OnDoWork(Object sender, DoWorkEventArgs e) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.UIFramework\Progress\ProcessRunner.cs:line 61 at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument) --- End of inner exception stack trace --- at Mendix.Modeler.UIFramework.Progress.ProcessRunner.Run() in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.UIFramework\Progress\ProcessRunner.cs:line 43 at Mendix.Modeler.UIFramework.Progress.ProgressUtil.Do[T](String message, Func`1 action) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.UIFramework\Progress\ProgressUtil.cs:line 47 at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at Mendix.Modeler.Utility.ToolStripEx.WndProc(Message& m) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Utility.Gui\Toolstrip\ToolStripEx.cs:line 142 at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
asked
Adrian Southwart
1 answers
0
Hello Adrian,
Have you tried finding if there’s an item with the same name (Through CTRL+G) ? Mendix requires the association name to be unique within that module as it creates a DB table for it.
If there isn’t one, can you not create a new association and change the retrieve in question to match your new association?