Error "Unable to cast object of type 'System.Char' to type 'System.String'." when using Information Links that contain keywords

Error "Unable to cast object of type 'System.Char' to type 'System.String'." when using Information Links that contain keywords

book

Article ID: KB0078579

calendar_today

Updated On:

Products Versions
Spotfire Analyst 10.1, 10.2

Description

When working with an analysis file, containing information link/s with keywords and loading data on-demand, the client may terminate with the error mentioned below when for example going to Data - Data table properties or inserting a calculated column.

Example error message:
************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast object of type 'System.Char' to type 'System.String'.
   at Spotfire.Dxp.Data.Formatters.StringFormatter.Format(Object obj)
   at Spotfire.Dxp.Forms.Data.DataProperties.DataPropertyUtility.FormatPropertyValue(DataType dataType, Boolean isListValued, Object propertyValue, DataPropertyClass propertyClass, IDataPropertyContainer container, Boolean hasInheritedType)
   at Spotfire.Dxp.Forms.Data.DataProperties.DataPropertyUtility.FormatExistingPropertyValue(String registeredPropertyName, Object propertyValue, DataPropertyClass propertyClass, IDataPropertyContainer container, IDataPropertyRegistry registry)
   at Spotfire.Dxp.Forms.Data.DataProperties.DataPropertiesControl.InitPropertyDataGridView()
   at Spotfire.Dxp.Forms.Data.DataProperties.DataPropertiesControl.Init(Document doc, IDataPropertyContainer container)
   at Spotfire.Dxp.Forms.Data.DataTableProperties.DataTablePropertiesDialog..ctor(DataManager dataManager, DataTable preselectedTable, Boolean modifySaveSettings)
   at Spotfire.Dxp.Forms.WebView.FormsMenuItems.EditDataTableProperties()
   at Spotfire.Dxp.Web.Menus.MenuItemHandler.Execute()
   at Spotfire.Dxp.Forms.WebView.FormsImplWebView.<>c__DisplayClass23_0.<PerformAsynchronousUiOperation>b__0()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Issue/Introduction

When working with files containing information links with keywords and loading data on-demand in TIBCO Spotfire Analyst, it may terminate with the error "Unable to cast object of type 'System.Char' to type 'System.String'."

Environment

All

Resolution

This is a known issue in TIBCO Spotfire 10.1 and 10.2 and has been addressed in hotfix HF-002 for version 10.2.

In order to fix this the following is needed:
1. Download and install version 10.2 with the latest hotfix. 
2. For old, existing analysis files (not created in 10.2 with latest hotfix) that are affected, also make sure to reload the data via Data - Reload all data.

Additional Information

keywords: keyword, keywords, information link, Unable to cast object of type 'System.Char' to type 'System.String', exception error