An entry with the same key already exists

Oct 13, 2015 at 12:40 PM
Hello, it is a few days I get the error: "An entry with the same key already exists" when I run the method call RegisterView () to a my specific view.

I do not understand what it refers to the error. What can I check?
thank you
Oct 13, 2015 at 3:20 PM
Edited Oct 13, 2015 at 3:31 PM
You have already registered a view with the same name before.
Oct 14, 2015 at 10:25 PM
No, it's not possible. This is my code:
 _Db = RaptorDB.RaptorDB.Open(path);
                    RaptorDB.Global.RequirePrimaryView = false;
                    _Db.RegisterView(new Managers.Hootlight.Views.HootlightView());
                    _Db.RegisterView(new Managers.Hootlight.Views.ProfilesView());
                    _Db.RegisterView(new Managers.Hootlight.Views.FoundItemsView());
               }
This is FoundItemsView

public FoundItemsView()
        {
            this.Name = "LOFI";
            this.Description = "A primary view for foundItems";
            this.isPrimaryList = false;
            this.isActive = true;
            this.ConsistentSaveToThisView = false;
            this.BackgroundIndexing = true;
            this.Version = 7;

            this.Schema = typeof(RowSchema);
            this.Mapper = (api, docid, doc) =>
            {
This is ProfilesView
  public ProfilesView()
        {
            this.Name = "List Of Profile";
            this.Description = "All Profile syncronized";
            this.isPrimaryList = false;
            this.isActive = true;
            this.BackgroundIndexing = false;
            this.Version = 1;
            this.Schema = typeof(RowSchema);
            this.Mapper = (api, docid, doc) =>
And This is HootlightView
 public HootlightView()
        {
            this.Name = "List Of Hootlight";
            this.Description = "All Hootlights syncronized";
            this.isPrimaryList = true;
            this.isActive = true;
            this.BackgroundIndexing = false;
            this.Version = 1;
            DeleteBeforeInsert = true;
            this.Schema = typeof(RowSchema);
            this.Mapper = (api, docid, doc) =>
            {
this is exception trace:
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.SortedList`2.Add(TKey key, TValue value)
   at RaptorDB.Common.SafeSortedList`2.Add(T key, V val)
   at RaptorDB.IndexFile`1.LoadPageListData(Int32 page, SafeSortedList`2 PageList)
   at RaptorDB.IndexFile`1.GetPageList(List`1 PageListDiskPages, SafeSortedList`2 PageList, Int32& lastIndexedRow)
   at RaptorDB.MGIndex`1..ctor(String path, String filename, Byte keysize, UInt16 maxcount, Boolean allowdups)
   at RaptorDB.TypeIndexes`1..ctor(String path, String filename, Byte keysize)
   at RaptorDB.Views.ViewHandler.CreateIndex(String name, Type type)
   at RaptorDB.Views.ViewHandler.CreateLoadIndexes(ViewRowDefinition viewRowDefinition)
   at RaptorDB.Views.ViewHandler.SetView[T](View`1 view, IDocStorage`1 docs)
   at RaptorDB.Views.ViewManager.RegisterView[T](View`1 view)
   at RaptorDB.RaptorDB.RegisterView[T](View`1 view)
   at DM.Orchestrator.Threads.HootlightBackgroundWorker.get_Db() in c:\Projects\DM\Server\DM.Orchestrator\Threads\HootlightBackgroundWorker.cs:line 24
   at DM.Orchestrator.Threads.HootlightBackgroundWorker.<ContinuousRefreshAsync>d__b.MoveNext() in c:\Projects\DocsMarshal\Server\DocsMarshal.Orchestrator\Threads\HootlightBackgroundWorker.cs:line 70
this is file log:
2015-10-14 23:23:02|DEBUG|13|RaptorDB.RaptorDB||

RaptorDB starting...
2015-10-14 23:23:02|DEBUG|13|RaptorDB.RaptorDB|| RaptorDB data folder = C:\Users\lucacavedaghi\AppData\Local\Temp\DOCSMarshal\hootlight\dbdocsmarshal.baiaholiday.com\-1\
2015-10-14 23:23:02|DEBUG|13|RaptorDB.KeyStore`1|| Current Count = 96.839
2015-10-14 23:23:02|DEBUG|13|RaptorDB.KeyStore`1|| Checking Index state...
2015-10-14 23:23:02|DEBUG|13|RaptorDB.KeyStore`1|| Starting save timer
2015-10-14 23:23:02|DEBUG|13|RaptorDB.KeyStore`1|| Current Count = 0
2015-10-14 23:23:02|DEBUG|13|RaptorDB.KeyStore`1|| Checking Index state...
2015-10-14 23:23:02|DEBUG|13|RaptorDB.KeyStore`1|| Starting save timer
2015-10-14 23:23:02|DEBUG|13|RaptorDB.Views.TaskQueue|| TaskQueue starting
2015-10-14 23:23:02|DEBUG|13|RaptorDB.Hoot|| Starting hOOt....
2015-10-14 23:23:02|DEBUG|13|RaptorDB.Hoot|| Storage Folder = C:\Users\lucacavedaghi\AppData\Local\Temp\DOCSMarshal\hootlight\dbdocsmarshal.baiaholiday.com\-1\Data\Fulltext\
2015-10-14 23:23:02|DEBUG|13|RaptorDB.KeyStore`1|| Current Count = 0
2015-10-14 23:23:02|DEBUG|13|RaptorDB.KeyStore`1|| Checking Index state...
2015-10-14 23:23:02|DEBUG|13|RaptorDB.KeyStore`1|| Starting save timer
2015-10-14 23:23:02|DEBUG|13|RaptorDB.Hoot|| Word Count = 6303