When saving a Spotfire document from an environment where Lead Discovery is not installed, if it was created from the default file (/LDConnector/Default/empty), you may encounter a "Disposed" error that prevents the document from being saved.
Details
This issue occurs because the Lead Discovery extension is not available in the environment, and the empty document we provide in releases 4.2.24 and earlier contains references to Lead Discovery components. When attempting to save the document, Spotfire tries to access these components, leading to the following error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.Serialization.SerializationException: Attempt to read from a node that is in state 'Disposed': Spotfire.Dxp.Framework.DocumentModel.State.DisposedUndoablePropertyNodeState`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].
Object reference chain leading to the fault (closest reference first):
Spotfire.Dxp.Application.CustomNodeStandIn.Table
Spotfire.Dxp.Application.CustomNodeStandIn.Tables[0]
Spotfire.Dxp.Application.CustomNodes.Nodes[0]
Spotfire.Dxp.Application.Document.CustomNodes
---> System.InvalidOperationException: Attempt to read from a node that is in state 'Disposed': Spotfire.Dxp.Framework.DocumentModel.State.DisposedUndoablePropertyNodeState`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].
Resolution
Starting with release 4.3.0, we provide an empty file that does not include references to Lead Discovery components. We strongly recommend using this updated empty file to create new Spotfire documents (this must be done by a Spotfire administrator following the import library step of the installation guide).
However, if you are using an older version of the LiveDesign Connector for Spotfire or if you have already created a document based on the previous empty file, you have the following options:
- Recreate the Spotfire document based on the updated empty file provided in release 4.3.0 or later.
- Install the Lead Discovery extension on the system where you are saving the document. This will ensure that all components referenced in the document are available, allowing you to save it without errors.
