0
Planned

"Attempting to retrieve the CollectionKeyId for caption <x> failed" after adding a new field when Locker objects already exist

Adrian Corston 1 month ago in UNIFYBroker/Plus • updated by Beau Harrison (Software Developer) 2 weeks ago 2

On a system with existing Locker records I added a new field to an Adapter, Locker and Link mapping, and then ran Changes Synchronization, which logged an error.  I then ran a Clear Sync Changes, followed by a Baseline Synchronization, but the same error still occurred.

I managed to get rid of the error by running Clear Entities on the Locker, which isn't ideal since I lost all my joins and had to careful resync my Links in the right order to avoid any undesirable provisioning attempts :-(

Synchronization job started syncing 42941 changes on the 'Chris21 DET' link from the adapter to locker. Job ID: b7478421-d9c7-405d-a286-290d823cd3eb",Normal
20190719,13:33:25,UNIFYBroker,Link,Error,"Request to sync changes on link failed.
Request to sync changes on link Chris21 DET (32a760fb-9e58-4761-ab12-9f57f10e79de) in direction outgoing failed with message Attempting to retrieve the CollectionKeyId for caption DETProvisioned failed. No collection key record found for that caption. [Count:42941]. Duration: 00:00:21.9409080
Error details:
System.ArgumentException: Attempting to retrieve the CollectionKeyId for caption DETProvisioned failed. No collection key record found for that caption.
at Unify.Product.Plus.LockerEntityValueOriginContext.LookupCollectionKeyId(String key)
at Unify.Product.Plus.LockerEntityValueOriginLinqQueryExecutorInformation.AddValueKeyFieldSearchValue(Guid searchID, String field)
at Unify.Product.Plus.VisitMethodWhereWithContainsValueKeyField.<>c__DisplayClass4_0.b__0(String item)
at Unify.Framework.Visitor.Visit[T](IEnumerable`1 visitCollection, Action`2 visitor)
at Unify.Product.Plus.VisitMethodWhereWithContainsValueKeyField.Transform(MethodCallExpression expression)
at Unify.Product.Plus.LockerEntityValueOriginExpressionQueryVisitor.VisitMethodCall(MethodCallExpression m)
at Unify.Framework.ExpressionVisitorBase`11.Visit(Expression exp)
at Unify.Framework.Data.LinqContextConversionExpressionVisitorBase`5.ConvertExpression(Expression partitionExpression)
at Unify.Framework.Data.LinqQueryConversionProvider`5.GetOrderedQuery(Expression businessExpression, IQueryable`1 sourceQueryable, TContext sourceContext)
at Unify.Framework.Data.LinqWhereQuery`5.GetEnumerator()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Unify.Product.Plus.PriorityRepository.<>c__DisplayClass14_0.b__3(Guid targetEntityId, AdapterEntityValueCollectionKey field)
at Unify.Product.Plus.Prioritizer.ShouldPrioritize(Guid targetEntityId, AdapterEntityValueCollectionKey field)
at Unify.Product.Plus.MappingApplicator.InnerApply[TSourceEntity,TTargetEntity](IJoinedEntityPair`2 joinedPair, ISyncChange syncChange, Boolean forUpdate, Boolean priorityLookupRequired)
at Unify.Product.Plus.MappingApplicator.ApplyForUpdate[TSourceEntity,TTargetEntity](IJoinedEntityPair`2 joinedPair, ISyncChange syncChange, Boolean priorityLookupRequired)
at Unify.Product.Plus.LinkSynchronizer`2.JoinAndMap(IEnumerable`1 filterResult, IDictionary`2 changesDict)
at Unify.Product.Plus.Link.SynchronizeAdapterChanges(IEnumerable`1 changes)
at Unify.Product.Plus.LinkNotifierDecorator.<>c__DisplayClass42_0.b__0()
at Unify.Framework.Notification.NotifierDecoratorBase.Notify[TResult](ITaskNotificationFactory notificationFactory, Func`1 function)
at Unify.Product.Plus.LinkAuditingDecorator.SynchronizeAdapterChanges(IEnumerable`1 changes)
at Unify.Product.Plus.AdapterToLockerSynchronizationJob.RunBase()
at Unify.Product.Plus.SynchronizationJobExecutor.d__8.MoveNext()",Normal
20190719,13:33:25,UNIFYBroker,SyncEngine,Information,"Request to sync adapter to locker errored.
Synchronization job failed syncing 42941 changes on the 'Chris21 DET' link from the adapter to locker with the reason Attempting to retrieve the CollectionKeyId for caption DETProvisioned failed. No collection key record found for that caption.. Job ID: b7478421-d9c7-405d-a286-290d823cd3eb Duration: 00:00:21.9409080
Error details:
System.ArgumentException: Attempting to retrieve the CollectionKeyId for caption DETProvisioned failed. No collection key record found for that caption.
at Unify.Product.Plus.LockerEntityValueOriginContext.LookupCollectionKeyId(String key)
at Unify.Product.Plus.LockerEntityValueOriginLinqQueryExecutorInformation.AddValueKeyFieldSearchValue(Guid searchID, String field)
at Unify.Product.Plus.VisitMethodWhereWithContainsValueKeyField.<>c__DisplayClass4_0.b__0(String item)
at Unify.Framework.Visitor.Visit[T](IEnumerable`1 visitCollection, Action`2 visitor)
at Unify.Product.Plus.VisitMethodWhereWithContainsValueKeyField.Transform(MethodCallExpression expression)
at Unify.Product.Plus.LockerEntityValueOriginExpressionQueryVisitor.VisitMethodCall(MethodCallExpression m)
at Unify.Framework.ExpressionVisitorBase`11.Visit(Expression exp)
at Unify.Framework.Data.LinqContextConversionExpressionVisitorBase`5.ConvertExpression(Expression partitionExpression)
at Unify.Framework.Data.LinqQueryConversionProvider`5.GetOrderedQuery(Expression businessExpression, IQueryable`1 sourceQueryable, TContext sourceContext)
at Unify.Framework.Data.LinqWhereQuery`5.GetEnumerator()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Unify.Product.Plus.PriorityRepository.<>c__DisplayClass14_0.b__3(Guid targetEntityId, AdapterEntityValueCollectionKey field)
at Unify.Product.Plus.Prioritizer.ShouldPrioritize(Guid targetEntityId, AdapterEntityValueCollectionKey field)
at Unify.Product.Plus.MappingApplicator.InnerApply[TSourceEntity,TTargetEntity](IJoinedEntityPair`2 joinedPair, ISyncChange syncChange, Boolean forUpdate, Boolean priorityLookupRequired)
at Unify.Product.Plus.MappingApplicator.ApplyForUpdate[TSourceEntity,TTargetEntity](IJoinedEntityPair`2 joinedPair, ISyncChange syncChange, Boolean priorityLookupRequired)
at Unify.Product.Plus.LinkSynchronizer`2.JoinAndMap(IEnumerable`1 filterResult, IDictionary`2 changesDict)
at Unify.Product.Plus.Link.SynchronizeAdapterChanges(IEnumerable`1 changes)
at Unify.Product.Plus.LinkNotifierDecorator.<>c__DisplayClass42_0.b__0()
at Unify.Framework.Notification.NotifierDecoratorBase.Notify[TResult](ITaskNotificationFactory notificationFactory, Func`1 function)
at Unify.Product.Plus.LinkAuditingDecorator.SynchronizeAdapterChanges(IEnumerable`1 changes)
at Unify.Product.Plus.AdapterToLockerSynchronizationJob.RunBase()
at Unify.Product.Plus.SynchronizationJobExecutor.d__8.MoveNext()",Normal
20190719,13:33:25,UNIFYBroker,Int32 LookupCollectionKeyId(System.String),Error,"Unify.Plus.ChangeTracking.Repository.Sql:
System.ArgumentException: Attempting to retrieve the CollectionKeyId for caption DETProvisioned failed. No collection key record found for that caption.
at Unify.Product.Plus.LockerEntityValueOriginContext.LookupCollectionKeyId(String key)
at Unify.Product.Plus.LockerEntityValueOriginLinqQueryExecutorInformation.AddValueKeyFieldSearchValue(Guid searchID, String field)
at Unify.Product.Plus.VisitMethodWhereWithContainsValueKeyField.<>c__DisplayClass4_0.b__0(String item)
at Unify.Framework.Visitor.Visit[T](IEnumerable`1 visitCollection, Action`2 visitor)
at Unify.Product.Plus.VisitMethodWhereWithContainsValueKeyField.Transform(MethodCallExpression expression)
at Unify.Product.Plus.LockerEntityValueOriginExpressionQueryVisitor.VisitMethodCall(MethodCallExpression m)
at Unify.Framework.ExpressionVisitorBase`11.Visit(Expression exp)
at Unify.Framework.Data.LinqContextConversionExpressionVisitorBase`5.ConvertExpression(Expression partitionExpression)
at Unify.Framework.Data.LinqQueryConversionProvider`5.GetOrderedQuery(Expression businessExpression, IQueryable`1 sourceQueryable, TContext sourceContext)
at Unify.Framework.Data.LinqWhereQuery`5.GetEnumerator()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Unify.Product.Plus.PriorityRepository.<>c__DisplayClass14_0.b__3(Guid targetEntityId, AdapterEntityValueCollectionKey field)
at Unify.Product.Plus.Prioritizer.ShouldPrioritize(Guid targetEntityId, AdapterEntityValueCollectionKey field)
at Unify.Product.Plus.MappingApplicator.InnerApply[TSourceEntity,TTargetEntity](IJoinedEntityPair`2 joinedPair, ISyncChange syncChange, Boolean forUpdate, Boolean priorityLookupRequired)
at Unify.Product.Plus.MappingApplicator.ApplyForUpdate[TSourceEntity,TTargetEntity](IJoinedEntityPair`2 joinedPair, ISyncChange syncChange, Boolean priorityLookupRequired)
at Unify.Product.Plus.LinkSynchronizer`2.JoinAndMap(IEnumerable`1 filterResult, IDictionary`2 changesDict)
at Unify.Product.Plus.Link.SynchronizeAdapterChanges(IEnumerable`1 changes)
at Unify.Product.Plus.LinkNotifierDecorator.<>c__DisplayClass42_0.b__0()
at Unify.Framework.Notification.NotifierDecoratorBase.Notify[TResult](ITaskNotificationFactory notificationFactory, Func`1 function)
at Unify.Product.Plus.LinkAuditingDecorator.SynchronizeAdapterChanges(IEnumerable`1 changes)
at Unify.Product.Plus.AdapterToLockerSynchronizationJob.RunBase()
at Unify.Product.Plus.SynchronizationJobExecutor.d__8.MoveNext()",Normal
20190719,13:34:37,UNIFYBroker,Link,Information,"Request to manually queue a baseline synchronization job on link started.
Request to manually queue a baseline synchronization job on link Chris21 DET started.",Normal
20190719,13:41:58,UNIFYBroker,Link,Information,"Request to manually queue a baseline synchronization job on link completed.
Request to manually queue a baseline synchronization job on link 'Chris21 DET' completed. Duration: 00:07:21.4025706",Normal
20190719,13:42:06,UNIFYBroker,SyncEngine,Information,"Request to sync adapter to locker started.
Synchronization job started syncing 42942 changes on the 'Chris21 DET' link from the adapter to locker. Job ID: a68bff33-8555-43e4-ac9b-222f014f1053",Normal
20190719,13:42:28,UNIFYBroker,Link,Error,"Request to sync changes on link failed.
Request to sync changes on link Chris21 DET (32a760fb-9e58-4761-ab12-9f57f10e79de) in direction outgoing failed with message Attempting to retrieve the CollectionKeyId for caption DETProvisioned failed. No collection key record found for that caption. [Count:42942]. Duration: 00:00:21.9446416
Error details:
System.ArgumentException: Attempting to retrieve the CollectionKeyId for caption DETProvisioned failed. No collection key record found for that caption.
at Unify.Product.Plus.LockerEntityValueOriginContext.LookupCollectionKeyId(String key)
at Unify.Product.Plus.LockerEntityValueOriginLinqQueryExecutorInformation.AddValueKeyFieldSearchValue(Guid searchID, String field)
at Unify.Product.Plus.VisitMethodWhereWithContainsValueKeyField.<>c__DisplayClass4_0.b__0(String item)
at Unify.Framework.Visitor.Visit[T](IEnumerable`1 visitCollection, Action`2 visitor)
at Unify.Product.Plus.VisitMethodWhereWithContainsValueKeyField.Transform(MethodCallExpression expression)
at Unify.Product.Plus.LockerEntityValueOriginExpressionQueryVisitor.VisitMethodCall(MethodCallExpression m)
at Unify.Framework.ExpressionVisitorBase`11.Visit(Expression exp)
at Unify.Framework.Data.LinqContextConversionExpressionVisitorBase`5.ConvertExpression(Expression partitionExpression)
at Unify.Framework.Data.LinqQueryConversionProvider`5.GetOrderedQuery(Expression businessExpression, IQueryable`1 sourceQueryable, TContext sourceContext)
at Unify.Framework.Data.LinqWhereQuery`5.GetEnumerator()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Unify.Product.Plus.PriorityRepository.<>c__DisplayClass14_0.b__3(Guid targetEntityId, AdapterEntityValueCollectionKey field)
at Unify.Product.Plus.Prioritizer.ShouldPrioritize(Guid targetEntityId, AdapterEntityValueCollectionKey field)
at Unify.Product.Plus.MappingApplicator.InnerApply[TSourceEntity,TTargetEntity](IJoinedEntityPair`2 joinedPair, ISyncChange syncChange, Boolean forUpdate, Boolean priorityLookupRequired)
at Unify.Product.Plus.MappingApplicator.ApplyForUpdate[TSourceEntity,TTargetEntity](IJoinedEntityPair`2 joinedPair, ISyncChange syncChange, Boolean priorityLookupRequired)
at Unify.Product.Plus.LinkSynchronizer`2.JoinAndMap(IEnumerable`1 filterResult, IDictionary`2 changesDict)
at Unify.Product.Plus.Link.SynchronizeAdapterChanges(IEnumerable`1 changes)
at Unify.Product.Plus.LinkNotifierDecorator.<>c__DisplayClass42_0.b__0()
at Unify.Framework.Notification.NotifierDecoratorBase.Notify[TResult](ITaskNotificationFactory notificationFactory, Func`1 function)
at Unify.Product.Plus.LinkAuditingDecorator.SynchronizeAdapterChanges(IEnumerable`1 changes)
at Unify.Product.Plus.AdapterToLockerSynchronizationJob.RunBase()
at Unify.Product.Plus.SynchronizationJobExecutor.d__8.MoveNext()",Normal
20190719,13:42:28,UNIFYBroker,SyncEngine,Information,"Request to sync adapter to locker errored.
Synchronization job failed syncing 42942 changes on the 'Chris21 DET' link from the adapter to locker with the reason Attempting to retrieve the CollectionKeyId for caption DETProvisioned failed. No collection key record found for that caption.. Job ID: a68bff33-8555-43e4-ac9b-222f014f1053 Duration: 00:00:21.9446416
Error details:
System.ArgumentException: Attempting to retrieve the CollectionKeyId for caption DETProvisioned failed. No collection key record found for that caption.
at Unify.Product.Plus.LockerEntityValueOriginContext.LookupCollectionKeyId(String key)
at Unify.Product.Plus.LockerEntityValueOriginLinqQueryExecutorInformation.AddValueKeyFieldSearchValue(Guid searchID, String field)
at Unify.Product.Plus.VisitMethodWhereWithContainsValueKeyField.<>c__DisplayClass4_0.b__0(String item)
at Unify.Framework.Visitor.Visit[T](IEnumerable`1 visitCollection, Action`2 visitor)
at Unify.Product.Plus.VisitMethodWhereWithContainsValueKeyField.Transform(MethodCallExpression expression)
at Unify.Product.Plus.LockerEntityValueOriginExpressionQueryVisitor.VisitMethodCall(MethodCallExpression m)
at Unify.Framework.ExpressionVisitorBase`11.Visit(Expression exp)
at Unify.Framework.Data.LinqContextConversionExpressionVisitorBase`5.ConvertExpression(Expression partitionExpression)
at Unify.Framework.Data.LinqQueryConversionProvider`5.GetOrderedQuery(Expression businessExpression, IQueryable`1 sourceQueryable, TContext sourceContext)
at Unify.Framework.Data.LinqWhereQuery`5.GetEnumerator()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Unify.Product.Plus.PriorityRepository.<>c__DisplayClass14_0.b__3(Guid targetEntityId, AdapterEntityValueCollectionKey field)
at Unify.Product.Plus.Prioritizer.ShouldPrioritize(Guid targetEntityId, AdapterEntityValueCollectionKey field)
at Unify.Product.Plus.MappingApplicator.InnerApply[TSourceEntity,TTargetEntity](IJoinedEntityPair`2 joinedPair, ISyncChange syncChange, Boolean forUpdate, Boolean priorityLookupRequired)
at Unify.Product.Plus.MappingApplicator.ApplyForUpdate[TSourceEntity,TTargetEntity](IJoinedEntityPair`2 joinedPair, ISyncChange syncChange, Boolean priorityLookupRequired)
at Unify.Product.Plus.LinkSynchronizer`2.JoinAndMap(IEnumerable`1 filterResult, IDictionary`2 changesDict)
at Unify.Product.Plus.Link.SynchronizeAdapterChanges(IEnumerable`1 changes)
at Unify.Product.Plus.LinkNotifierDecorator.<>c__DisplayClass42_0.b__0()
at Unify.Framework.Notification.NotifierDecoratorBase.Notify[TResult](ITaskNotificationFactory notificationFactory, Func`1 function)
at Unify.Product.Plus.LinkAuditingDecorator.SynchronizeAdapterChanges(IEnumerable`1 changes)
at Unify.Product.Plus.AdapterToLockerSynchronizationJob.RunBase()
at Unify.Product.Plus.SynchronizationJobExecutor.d__8.MoveNext()",Normal
201

Affected Versions:
Fixed by Version:

UNIFYBroker/Plus v5.3.0.2

Planned

Thanks, Adrian. Added to the backlog.