An item with the same key has already been added

  • 16 February 2021
  • 0 replies
  • 4 views

Userlevel 4
Badge +16




 








"An item with the same key has already been added."































This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.




Issue



The following error is displayed in the K2 Management page:



 



Image



Symptoms



This issue can occur when you access the "Users > K2 > Domains" option.



 



Image



 



The full error message looks like this:



 



 



An item with the same key has already been added.


 






  • Type:

    SourceCode.SmartObjects.Client.SmartObjectException




  • Source:

    SourceCode.SmartObjects.Client




  • Method Base




    • Member Type:

      Method




    • Name:

      GetSmartObjectReader




    • Module




      • Scope Name:

        SourceCode.SmartObjects.Client.dll






    • Declaring Type




      • Full Name:

        SourceCode.SmartObjects.Client.SmartObjectClientServer








  • Stack Trace:

    at SourceCode.SmartObjects.Client.SmartObjectClientServer.GetSmartObjectReader(SmartObject smartObject, ExecuteListReaderOptions options, Dictionary`2& propertyReference)
    at SourceCode.Forms.AppFramework.FormsApiToXml.GetSmartObjectReader(ExecuteListReaderOptions options)
    at SourceCode.Forms.AppFramework.FormsApiToXml.ToListResults(SmartMethodBase executedMethod, Boolean overrideListCount)
    at SourceCode.Forms.AppFramework.FormRuntime.SmartObjectExecution(BrokerSmartObject brokerSmo, SmartObjectBrokerMetaData brokerMetaData, Boolean outputDependencies, SmartObjectClientServer smoClientServer, Queue`1 soInstances)
    at SourceCode.Forms.AppFramework.FormRuntime.WorkXmlToApi(BrokerPackageCollection packages, SmartObjectClientServer smoClientServer)
    at SourceCode.Forms.AppFramework.FormRuntime.WorkXmlToApi(Stream input, Stream output)
    at SourceCode.Forms.Runtime.AJAXCall.ProcessRequestInternal(HttpContext context








Resolution



This issue may occur because you have a duplicate value in your K2 Database inside the [HostServer].[SecurityLabel] table.



 



It is possible you may have a duplicate value within your "K2" Security label under the "RoleInit" column, for example:



 



MultiDomain=False;OnlyUseSecurityGroups=False;LogLevel=Error;LogSize=0;LogSize=0;



 



To resolve this issue please contact K2 Support, as direct database modification is not supported.



 



 










0 replies

Be the first to reply!

Reply