Crash or error message when trying to save an analysis containing an SAP BW data source

book

Article ID: KB0078234

calendar_today

Updated On:

Products Versions
Spotfire Analyst 7.11 to 10.2

Description

An analysis containing a SAP BW data source cannot be saved. Spotfire Analyst either crashes or an error message appears.

Example of error message:
 

Error message: Could not publish THE_NAME_OF_SOMETHING.
 
ArgumentException at mscorlib:
An item with the same key has already been added. (HRESULT: 80070057)


Stack trace when crashing:
 
Stack Trace:
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Spotfire.Dxp.Data.Access.NamedValues.WriteToXml(XmlWriter writer)
   at Spotfire.Dxp.Xml.XmlExtensions.WriteElement(XmlWriter writer, String localName, IEnumerable`1 items)
   at Spotfire.Dxp.Data.Access.Modeling.VirtualJoinView.WriteToXmlCore(XmlWriter writer)
   at Spotfire.Dxp.Xml.XmlExtensions.WriteElement(XmlWriter writer, String localName, IEnumerable`1 items)
   at Spotfire.Dxp.Data.Access.Modeling.DataConnectionModelling.WriteToXmlCore(XmlWriter writer)
   at Spotfire.Dxp.Data.Access.Modeling.DataConnectionLink.WriteToXmlCore(XmlWriter writer)
   at Spotfire.Dxp.Data.Access.Modeling.DataConnection.WriteToXmlCore(XmlWriter writer)
   at Spotfire.Dxp.Xml.XmlExtensions.WriteElement(XmlWriter writer, String localName, IEnumerable`1 items)
   at Spotfire.Dxp.Data.Access.Modeling.DataAccessPlan.WriteToXmlCore(XmlWriter writer)
   at Spotfire.Dxp.Data.Access.Loader.DataArchiveReaderWriter.Write(DataAccessPlan dataAccessPlan, ZipWriter zipWriter)
   at Spotfire.Dxp.Framework.Persistence.DxpFileContributorRegistry.OnWriteToDxp(DocumentLocationType documentLocationType, ZipWriter zipWriter)
   at Spotfire.Dxp.Framework.Persistence.PersistenceManager.Save(DocumentTypes documentType, DocumentNode doc, IDocumentSaveSettings settings, Stream targetStream)
   at Spotfire.Dxp.Framework.Persistence.PersistenceManager.Save(DocumentTypes documentType, DocumentNode doc, IDocumentSaveSettings settings, String fileName)
   at Spotfire.Dxp.Application.AnalysisApplication.SaveAs(LibraryEntry entry, Document document, LibraryItemMetadataSettings metadataSettings, DocumentSaveSettings saveSettings)
   at Spotfire.Dxp.Forms.Application.FileUserActions.<>c__DisplayClass9.<SaveAsLibrary>b__7()
   at Spotfire.Dxp.Forms.Application.FormsProgressService.ProgressThread.DoOperationLoop()

Cause:
The problem occurs when using the same value to define both limits of the range in the range prompt.
 

Environment

Windows

Resolution

This is a known issue in version 10.2 and lower.

Solution
Upgrade to version 10.3.0 or higher, where the issue has been addressed.

Workaround (if using version 10.2 or lower):
Do not use the same value to define both limits in the range prompt.

Issue/Introduction

An analysis containing a SAP BW data source cannot be saved. The client either crashes or an error message appears: "Could not publish xxx.ArgumentException at mscorlib: An item with the same key has already been added. (HRESULT: 80070057)". The problem occurs when using the same value to define both limits of the range in the range prompt.

Additional Information

Keywords:
SAP BW, crash, error message, error, "An item with the same key has already been added", saving , data connection , BAPI