0
Not a bug

Error on import from chris21

Jerry Natarajan 7 years ago in UNIFYBroker/Frontier ichris/chris21 updated by anonymous 7 years ago 5

I'm getting the following error on import from Identity Broker for chris21 v4.1.

Change detection engine import all items failed.Change detection engine import all items for connector Chris21 Person Connector failed with reason An error occurred while evaluating a task on a worker thread. See the inner exception details for information.. Duration: 00:00:51.0016320
Error details:
Unify.Framework.EvaluatorVisitorException: An error occurred while evaluating a task on a worker thread. See the inner exception details for information. ---> System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector)
at Unify.Product.IdentityBroker.PageableEntityChangesReportGenerator`2.ToDistinctChangesEnumerable(IEnumerable`1 entitiesWithKey, IHashSet`1& knownEntityKeys)
at Unify.Product.IdentityBroker.PageableEntityChangesReportGenerator`2.CreateDifferencesReport(IEnumerable`1 knownEntities, IEnumerable`1 newEntities)
at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.PerformChangeDetectionOnConnectorEntityPage(IEnumerable`1 connectorEntities, Int32& index, Int32 entitiesProcessedSoFar, IEntityChangesReportGenerator`2 reportGenerator, IHashSet`1 seenKeys)
at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.<>c__DisplayClass12_0.<PerformChangeDetection>b__0(IEnumerable`1 page)
at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.ThreadsafeItemEvaluator.Evaluate()
--- End of inner exception stack trace ---
at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.CheckForException()
at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.WaitForAvailableThread()
at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.Visit()
at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.PerformChangeDetection(IEnumerable`1 connectorEntities)
at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.ImportAllChangeProcess()
at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.RunBase()
at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run()
at Unify.Product.IdentityBroker.ConnectorJobExecutor.<>c__DisplayClass27_0.<Run>b__0()
at Unify.Framework.AsynchronousJobExecutor.PerformJobCallback(Object state)

Answer

+1
Answer
Fixed

Issue was resolved via data refresh.

Under review

Hi Jerry,

Sorry for the delayed reply. I am attaching Unify.IdentityBroker.ChangeDetection.dll which will add some extra logging around the problem code to help us diagnose the issue. Please download the file, place it in the Services folder of the Identity Broker installation directory, restart the service, re-attempt the import a couple of times and then send through the log files.

This is the error I am getting now. But when I query the entity ids, I am getting 2 detnumbers

6f539ff5-0308-4234-80cd-44b84a909aab, detnumber- 11067
05ce1c33-cace-4aae-8916-77c2965d5403 det-number - 12962

Connector processing failed.
Connector Processing page 1 for connector Chris21 Person Connector failed with reason Unable to process changes for existing entities because the following entity IDs were duplicated: 6f539ff5-0308-4234-80cd-44b84a909aab, 05ce1c33-cace-4aae-8916-77c2965d5403. Duration: 00:00:01.4041404. 
Error details:
System.Exception: Unable to process changes for existing entities because the following entity IDs were duplicated: 6f539ff5-0308-4234-80cd-44b84a909aab, 05ce1c33-cace-4aae-8916-77c2965d5403 ---> System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector)
at Unify.Product.IdentityBroker.PageableEntityChangesReportGenerator`2.ToDistinctChangesEnumerable(IEnumerable`1 entitiesWithKey, IHashSet`1& knownEntityKeys, String callingIdentifier)
--- End of inner exception stack trace ---
at Unify.Product.IdentityBroker.PageableEntityChangesReportGenerator`2.ToDistinctChangesEnumerable(IEnumerable`1 entitiesWithKey, IHashSet`1& knownEntityKeys, String callingIdentifier)
at Unify.Product.IdentityBroker.PageableEntityChangesReportGenerator`2.CreateDifferencesReport(IEnumerable`1 knownEntities, IEnumerable`1 newEntities)
at Unify.Product.IdentityBroker.ConnectorEntityChangeProcessor.ProcessEntities(IEnumerable`1 connectorEntities, IEnumerable`1 repositoryEntities, IEntityChangesReportGenerator`2 reportGenerator)
at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.PerformChangeDetectionOnConnectorEntityPage(IEnumerable`1 connectorEntities, Int32& index, Int32 entitiesProcessedSoFar, IEntityChangesReportGenerator`2 reportGenerator, IHashSet`1 seenKeys)
at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.<>c__DisplayClass12_0.<PerformChangeDetection>b__0(IEnumerable`1 page)
at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.ThreadsafeItemEvaluator.Evaluate()

Hi Jerry,

I'm currently investigating the cause of this issue. In the meantime, could you please try running the import another time and let me know if the entity IDs reported change between runs?

+1
Answer
Fixed

Issue was resolved via data refresh.