Product: TIBCO Spotfire®
Information Designer in TIBCO Spotfire Analyst 10.0 may fail to open with error "An item with the same key has already been added"
There might be cases where opening an Information Designer may hang or fail to open after upgrading to 10.0 even though the same upgraded Spotfire database is used. After the Information Designer fails to open, you may notice the following error in the Spotfire.Dxp.SupportDiagnostics.log:
2018-11-07T09:02:12,788-05:00 2018-11-07 14:02:12,788 firstname.lastname@example.org [Main Thread] ERROR Spotfire.Dxp.Web.Menus.MenuItemHandler [(null)] - Unhandled exception in men item handler System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Spotfire.Dxp.Forms.Data.InformationDesigner.Cache.InformationModelCache.RefreshDataSourceTypes() at Spotfire.Dxp.Forms.Data.InformationDesigner.Cache.InformationModelCache..ctor(InternalInformationModelManager manager) at Spotfire.Dxp.Forms.Data.InformationDesigner.DesignerForm..ctor(DesignerFormController controller, InternalInformationModelManager manager) at Spotfire.Dxp.Forms.Data.InformationDesignerUserActionHandler.HandleActionImpl(Object sender, EventArgs e) at Spotfire.Dxp.Web.Menus.MenuItemHandler.Execute()
This issue is seen because there are two data source templates with the same type-name in the TIBCO Spotfire Server configuration (configuration.xml). For example, if you have a data source template named "Redshift" and the other one called "Amazon Redshift", then you will run into this issue since both the templates have the type-name as "Amazon Redshift". This may be seen in Spotfire 10.0 if you already have one of them enabled in your previous versions, as by default a template is added by Spotfire during the upgrade. To resolve, export the TIBCO Spotfire Server configuration per the reference Manually editing the server configuration in an XML or text editor, and check if you have multiple "data-source-template" nodes with the same "type-name". For example, this is an example of two data source templates that have the same "<type-name>Amazon Redshift</type-name>":
<data-source-template> <name>Amazon Redshift</name> <enabled>true</enabled> <definition><![CDATA[<jdbc-type-settings> <type-name>Amazon Redshift</type-name> ...and:
<data-source-template> <name>Redshift</name> <enabled>true</enabled> <definition><![CDATA[<jdbc-type-settings> <type-name>Amazon Redshift</type-name> ...
To resolve this issue, alter the <type-name> of one of the data-source-templates to something else. For example, change "<type-name>Amazon Redshift</type-name>" to "<type-name>Amazon Redshift 2</type-name>" for one of the data-source-templates. Once saved, import the configuration to the database, and restart the TIBCO Spotfire Server service.
If you receive this error and do not have a duplicate type-name in your configuration, please contact TIBCO Support for assistance. Doc: Manually editing the server configuration in an XML or text editor