Item has already been added. Key in dictionary

Last post 05-27-2006 5:59 AM by liffey. 49 replies.

Sort Posts:

  • Item has already been added. Key in dictionary

    04-06-2005, 4:55 PM
    • Participant
      830 point Participant
    • liffey
    • Member since 05-20-2003, 10:00 AM
    • Dublin, Ireland
    • Posts 166

    I have 8 sites running on a single install.  The log viewer is showing errors when I select All Portals.  However if I select each portal individually no errors are shown. It is as if DNN is trying to index a non existant portal.  Could this be true? 

    If I turn off the schedule for indexing the errors stop.  Obviously I want indexing performed.  Any suggestions as to where I should look to resolve this?  I am running 3.0.13 upgraded from 2.1.2 to 3.0.12 and then 3.0.13.

     

    AssemblyVersion: -1
    Method:
    FileName:
    FileLineNumber: -1
    FileColumnNumber: -1
    PortalID: -1
    PortalName:
    UserID: -1
    UserName:
    ActiveTabID: -1
    ActiveTabName:
    AbsoluteURL:
    AbsoluteURLReferrer:
    ExceptionGUID:
    DefaultDataProvider:
    InnerException: Item has already been added. Key in dictionary: "sweden" Key being added: "sweden"
    Message: System.ArgumentException: Item has already been added. Key in dictionary: "sweden" Key being added: "sweden" at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.Add(Object key, Object value) at DotNetNuke.Services.Search.SearchDataStore.GetSearchWords() at DotNetNuke.Services.Search.SearchDataStore.AddIndexWords(Int32 IndexId, SearchItemInfo SearchItem, String Language) at DotNetNuke.Services.Search.SearchDataStore.StoreSearchItems(SearchItemInfoCollection SearchItems)
    StackTrace:
    Source:

  • Re: Item has already been added. Key in dictionary

    04-26-2005, 5:48 PM
    • Participant
      830 point Participant
    • liffey
    • Member since 05-20-2003, 10:00 AM
    • Dublin, Ireland
    • Posts 166
    Has no one any ideas on this one!Sad [:(]
  • Re: Item has already been added. Key in dictionary

    04-26-2005, 8:04 PM
    • Star
      11,292 point Star
    • brian_c
    • Member since 01-22-2004, 6:31 PM
    • Frisco, TX
    • Posts 2,259

    maybe a portal did not upgrade ok ...

    or a portal creation failed ..

    do you (or did you) have a portal that does not have a portal name ...  or a portal that has duplicate page names ...

    Is sweden a portal name .. or a page name ..  from an old portal?

     

  • Re: Item has already been added. Key in dictionary

    04-27-2005, 4:37 AM
    • Participant
      830 point Participant
    • liffey
    • Member since 05-20-2003, 10:00 AM
    • Dublin, Ireland
    • Posts 166

    It is possible an upgrade or portal creation failed.  If so how do I recover from it?

    All my portals have unique names and none are blank.  In fact some have more than one alias.  ie:  www.mysite.com and mysite.com.

    sweden is not a portal or page name.  If I delete sweden from the search tables then slovenia causes the same problem.

    I disabled the search engine schedule and deleted the full contents of all the search tables: SearchItemWordPosition, SearchItemWord, SearchItem, SearchWord. Now it complains "Item has already been added. Key in dictionary: "which" Key being added: "which""

    I wonder did the upgrade fail on setting up indices or triggers or such like on some tables? I have 2 dbs running 2 installs of DNN3.  The first is upgraded from 2.1.2 to 3.0.12 and then 3.0.13.  The second is a clean install of DNN 3.0.13 and has no problems.  This definately looks like an upgrade problem.  I am currently downloading both dbs to my local machine so that I can compare them.  Could take a whileSad [:(]  I'll report back.

    Declan

  • Re: Item has already been added. Key in dictionary

    04-27-2005, 6:34 AM
    • Participant
      830 point Participant
    • liffey
    • Member since 05-20-2003, 10:00 AM
    • Dublin, Ireland
    • Posts 166

    What I have found, so far, is that one of my clients (with 2 sites) has duplicate Tab names.  On 1 site there 13 pairs of tabs with the same TabName - all unique TabIds

    e.g. 

    TabID  TabName

    409      Tab One

    406      Tab One

    430      Tab Two

    419      Tab Two

     

    Could this be a problem?  I hope not as it is quite possible that a user could inadvertantly add a tab with the same name as an existing tab.

     

  • Re: Item has already been added. Key in dictionary

    04-29-2005, 10:06 AM
    • Participant
      830 point Participant
    • liffey
    • Member since 05-20-2003, 10:00 AM
    • Dublin, Ireland
    • Posts 166

    Because of the problems I am having I decided to disable the SearchEngine Schedule item and unchecked the checkbox.  Instead of disaling the schedule it now runs every 5 minutes!!! 

    Is there a problem with the Scheduler?

     

  • Re: Item has already been added. Key in dictionary

    04-30-2005, 5:32 PM
    • Participant
      830 point Participant
    • liffey
    • Member since 05-20-2003, 10:00 AM
    • Dublin, Ireland
    • Posts 166

    Continuing problem:

    Item has already been added. Key in dictionary: "which" Key being added: "which"

    I have traced this to:

    Provider.Search.DataStore 
    SearchDataStore.vb 
    Function GetSearchWords

    The exception is fired at:
    objWords.Add(drWords("Word").ToString, drWords("SearchWordsID"))

    on trying to add the word "which" to the HashTable. "which" is the first duplicated word returned by the stored procedure GetSearchWords.

    My question is:
    Should the table SearchWord allow duplicate entries in the field 'Word'? There is no index on this field.

    I have compared my db (upgraded from 2.1.2 to 3.0.12 and then 3.0.13) to a clean install of 3.0.13 and find no differences in tables or stored procedures.

    WHat do I do next?Angry [:@]

    Declan


     

  • Re: Item has already been added. Key in dictionary

    05-04-2005, 3:26 PM
    • Participant
      1,235 point Participant
    • pmgerholdt
    • Member since 08-07-2002, 7:36 PM
    • fredonia ny usa
    • Posts 247

    I find this:

          <property>
            <name>Message</name>
            <value>System.ArgumentException: Item has already been added.  Key in dictionary: "entitled"  Key being added: "entitled"
       at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
       at System.Collections.Hashtable.Add(Object key, Object value)
       at DotNetNuke.Services.Search.SearchDataStore.GetSearchWords()
       at DotNetNuke.Services.Search.SearchDataStore.AddIndexWords(Int32 IndexId, SearchItemInfo SearchItem, String Language)
       at DotNetNuke.Services.Search.SearchDataStore.StoreSearchItems(SearchItemInfoCollection SearchItems)</value>
          </property>

    around 200 times in the Exception.xml.resources files.

    What does it mean?

    Also, regarding the log file, it is about 34500 rows in length. (1.17 Mb) Should it be pruned? I notice that it grows and shrinks in length.

     

  • Re: Item has already been added. Key in dictionary

    06-24-2005, 1:53 AM
    • Member
      5 point Member
    • CrazyBeast
    • Member since 06-24-2005, 5:47 AM
    • Posts 1
    Hello-
    Has anyone found an answer to this problem? This problem has also cropped up for me, and now a couple of my custom modules that were returning results before are no longer displaying on search results! The proper values are in the SearchItem table so they are being indexed, but the log is full of "System.ArgumentException: Item has already been added. Key in dictionary: "907-247-8574" Key being added" error messages or the like.

    This first started happening after I made some changes to my business objects GetSearchItem method and re-indexed. I did also try modifying the search to exclude common words and to change the min word length from 3 to 4 characters.

    Is it safe to just completely clobber the values in the SearchXX  tables and try to rebuild??

    Any other thoughts on this problem? I was preparing for the first client presentation tomorrow and now all of a sudden my custom objects have disappeared....

    Thanks in advance!
    -Ben
  • Re: Item has already been added. Key in dictionary

    08-03-2005, 6:01 PM
    • Member
      465 point Member
    • tommcmur
    • Member since 07-24-2002, 10:46 AM
    • Black Mountain, NC
    • Posts 93
    liffey,

    did you get resolution to this problem?
  • Re: Item has already been added. Key in dictionary

    08-04-2005, 5:21 AM
    • Participant
      830 point Participant
    • liffey
    • Member since 05-20-2003, 10:00 AM
    • Dublin, Ireland
    • Posts 166
    Not yet but I believe it is resolved in 3.1.1.  The core are currently eating their own dog food on this so with a little luck whe should see it soon.

    Declan
  • Re: Item has already been added. Key in dictionary

    08-04-2005, 12:30 PM
    • Member
      60 point Member
    • ardeecom
    • Member since 02-12-2005, 11:52 PM
    • Houston, TX
    • Posts 12
     liffey wrote:
    Not yet but I believe it is resolved in 3.1.1.  The core are currently eating their own dog food on this so with a little luck whe should see it soon.

    Declan

    And where do we get 3.1.1? I do not see it available on DNN yet. Is there a possible release date?
  • Re: Item has already been added. Key in dictionary

    08-04-2005, 8:29 PM
    • Participant
      960 point Participant
    • Patrizio
    • Member since 12-05-2002, 1:00 AM
    • Lima, Peru
    • Posts 190
     CrazyBeast wrote:
    Hello-
    Has anyone found an answer to this problem? This problem has also cropped up for me, and now a couple of my custom modules that were returning results before are no longer displaying on search results! The proper values are in the SearchItem table so they are being indexed, but the log is full of "System.ArgumentException: Item has already been added. Key in dictionary: "907-247-8574" Key being added" error messages or the like.

    Thanks in advance!
    -Ben


    Ben,

    I posted some suggestions about this error in Gemini (Issue DNNP-1350). Remember, these are only suggestions and not official core changes. Something you must aware off is that correcting this error/bug reveals other errors that may be worst for you.
    I have my code changes suggestions in one production server as test platform and they minimized the duplicate word values in SearchWord table (Happens only once after the change and not every time). But these changes also uncovered other DB procedure errors like foreign key errors, deadlocking and similar. At one point my DB server cpu climbed to 100%.
    My recommendation to you is, create a SP to delete all duplicate word field values from SearchWord table and wait for DNN 3.1.1, which according some core members posts (
    look here), should be released at the end of next week.


    Patrizio
    MCP, MCAD, MCSD, MCSD.NET, MCT, MBS Master Developer
  • Re: Item has already been added. Key in dictionary

    08-05-2005, 4:48 AM
    • Participant
      830 point Participant
    • liffey
    • Member since 05-20-2003, 10:00 AM
    • Dublin, Ireland
    • Posts 166
     ardeecom wrote:
    And where do we get 3.1.1? I do not see it available on DNN yet. Is there a possible release date?


    Very soon now I suspect   http://forums.asp.net/1004761/ShowPost.aspx
  • Re: Item has already been added. Key in dictionary

    08-18-2005, 11:11 PM
    • Member
      20 point Member
    • erwilkinson
    • Member since 04-19-2005, 11:06 PM
    • Atlanta, GA
    • Posts 4

    Liffey - I'm getting this same error on one of my busy client sites in a shared hosting environment.  The log file size was huge (over 200 MB) with the same error.  We were shut down for keeping CPU utilization at 100% rather consistently due to the process writing to the Exception.xml.resources file.  I cruised through the Gemini site and found this issue mentioned as a bug, however didn't see that it was assigned to be fixed.  Have you had confirmation that it will be corrected in 3.1.1?

    Thank!

    Erik

Page 1 of 4 (50 items) 1 2 3 4 Next >