KTA 7.8+ DataLayer Migration - The given key was not present in the dictionary
Issue
When upgrading to KTA v7.8/v7.9, the Data Layer Migration reports the below error and stack trace.
Kofax.TotalAgility.CaptureDataMigration Error: 38 : System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Kofax.TotalAgility.CaptureDataMigration.SourceDataReader.BinaryDataReader.ProcessDocRefs(IdentityProvider idProvider, KeyValuePair`2 binaryRef, Hierarchy currentHierarchy, RepositoryObject parent, Dictionary`2 binariesRows)
at Kofax.TotalAgility.CaptureDataMigration.SourceDataReader.BinaryDataReader.<Read>d__1.MoveNext()
--- 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 Kofax.TotalAgility.CaptureDataMigration.SourceDataReader.HierarchyReader.ReadHierarchies(MigrationContext context, IdentityProvider identityProvider, IReadOnlyCollection`1 rootFolderIds)
at Kofax.TotalAgility.CaptureDataMigration.Execution.ReadingThread.ThreadRoutine()
at Kofax.TotalAgility.CaptureDataMigration.Execution.ExecutionThread.ThreadRoutineCore()
Cause
This is caused by BinaryData entries associated with Documents, Pages or Extensions no longer existing.
Solution
If upgrading to v7.8 or v7.9, the attached FindMissingBinaryData.sql can be used to identify missing binary data. This should be run on a restored copy of the pre-upgraded TotalAgility_Documents database. Raise a case with Kofax Technical Support with the results attached. A script can be provided to update the entries that have missing binary data.
If upgrading to v7.10+, the Data Layer Migration will automatically detect the missing binary data. The user performing the upgrade will then be prompted to "Ignore broken folders".
Level of Complexity
Moderate
Applies to
Product | Version | Build | Environment | Hardware |
---|---|---|---|---|
KTA | 7.8, 7.9 |