The Archive Manager MMC snap-in encounters an error - "An entry with the same key already exists" and causes the MMC to close
On a system with invalid store ids registered, a user may expand Archive Manager > Storage > 'All stores' and the MMC may display an error that partially reads, 'An entry with the same key already exists.' The error text box contains more information:
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.SortedList`2.Add(TKey key, TValue value).
Each store of archive data residing on a volume has its own unique ID that the software uses to identify it. Due to a bug in an old version of the software, multiple volumes may have registered a store's unique ID. The software then cannot associate the correct store with the correct volume.
To correct the behavior, review the registry. Find the ObjectStore ID that has been registered on two different volumes. Identify and delete the invalid entry. Note, you should be certain you have correctly identified the invalid entry before removing it. In addition, the software may have created an Objectstore folder on the second, invalid volume, that you should also delete from the volume, leaving the valid Objectstore folder in place on both volumes. To view the Objectstore folders on a disk, see our kb: How to view the Objectstore folder on disk.
1. Open regedit and navigate to HKLM\Software\DATASTOR\Volumes. (Export the Volumes subkey prior to making any changes in case you need to revert to prior entries.)
2. Expand the Volumes key in the left pane and look through each volume's 'stores' subkey. To identify the invalid entry, compare the 'stores' entries for each volume and identify any volumes with matching IDs. In the screenshot below, the volume 841300021500 contains two store IDs. Searching the remaining volumes reveals that the volume 841300021501 also contains the same store ID {01181ddc-fcbb-4b80-ab63-e03fff23f1d9}.
To identify which registry entry is the invalid entry, insert the cartridge with two IDs into the RDX dock, e.g. cartridge 841300021500, and view the objectstore folder or folders present. If an Objectstore folder with the suspect UID exists on the cartridge, confirm it has not been used by the software. Open the Objectstore{01181ddc-fcbb-4b80-ab63-e03fff23f1d9} directory using Windows File Explorer . If the folder only contains a Config.xml file and an Archives subfolder and is only a few KB in size, this is the invalid directory and it is safe to delete it. There would be no Common Content directory present in the Objectstore folder. If this folder does contain a Common Content folder, stop. This is a valid store that may contain backup data. Do not delete it.
Once confirmed,
- Delete the invalid Objectstore folder on the cartridge.
- In registry editor, select HKLM\Software\DATASTOR\Volumes\[the volume]\stores\[the ID], where [the volume] is the volume with the invalid entry and [the ID] is the invalid ID entry. Delete the invalid ID entry. In this case, you would delete the {01181ddc-fcbb-4b80-ab63-e03fff23f1d9} entry.
- If the first volume did not contain an invalid Objectstore directory, investigate the second volume using the same steps.