Hi,
I think that the problem was your importing catalog has da-DK language, while the existing one already has da-dk language (note the casing). So you have two options, either update the database (table CatalogLanguage, CatalogId =75) to make it da-DK, or update the import catalog to make it da-dk.
Note that updating database should be done with proper backup and cautions!
It does not seem to relate to the bug you linked. We'll look into this to see if we can improve the situation.
Regards,
/Q
Hi Quan,
I have a clean database and I have Imported the catalog to episerver commerce with success først time. Which mean I should have create ( and it is ) with correct language (da-dk seen it in DB ).
Next is the update a entity or import the catalog again which give this error.
My import katalog ( xml files) has language in lower cases 'da-dk' which should not be the problem. right?
<Catalog name="Shop" lastmodified="2017-01-24 10:04:00" startDate="2017-01-24 09:04:21Z" endDate="2117-01-24 09:04:21Z" defaultCurrency="DKK" weightBase="kgs" defaultLanguage="da-dk" sortOrder="0" isActive="True" languages="en">
Hmm. Can you send the catalog directly to me? Make sure it has all the required metaclasses so I can import to my vanilla Commerce site :)
Regards,
Hi again,
I have found the error it was the catalog languages make the trouble
<Catalog name="Telia" lastmodified="2017-01-24 10:38:00" startDate="2017-01-24 09:48:45Z" endDate="2117-01-24 09:48:45Z" defaultCurrency="DKK" weightBase="kgs" defaultLanguage="da-dk" sortOrder="0" isActive="True" languages="da-dk,en-us">
Hi,
We are trying to import InRiver data to Episerver commerce and we get this error when importing.
We have a catalog where da-DK enabled language and the catalog we are importing has default language da-DK
2017-01-24 10:05:17,389 [102] ERROR inRiver.EPiServerCommerce.Import.InriverDataImportController: Catalog Import Failed
System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PK_CatalogLanguage'. Cannot insert duplicate key in object 'dbo.CatalogLanguage'. The duplicate key value is (75, da-dk).
The statement has been terminated.
at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows)
at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
at Mediachase.Data.Provider.SqlDataProvider.SaveRows(DataCommand command)
at Mediachase.Commerce.Storage.DataHelper.SaveDataSetSimple(DataCommand cmd, DataSet set, String[] tables)
at Mediachase.Commerce.Catalog.Data.CatalogAdmin.Save()
at Mediachase.Commerce.Catalog.Managers.CatalogManager.SaveCatalog(CatalogDto dataset)
at Mediachase.Commerce.Catalog.ImportExport.CatalogImportExport.Import(Stream input, Guid applicationId, String baseFilePath, Boolean overwrite)
at inRiver.EPiServerCommerce.Import.InriverDataImportController.ImportCatalogXmlWithHandlers(Stream catalogXml, IEnumerable`1 catalogImportHandlers) in D:\(deleted)\InRiver.EPiServerCommerce\Import\InriverDataImportController.cs:line 667
at inRiver.EPiServerCommerce.Import.InriverDataImportController.ImportCatalogXml(String path) in D:\(deleted)\InRiver.EPiServerCommerce\Import\InriverDataImportController.cs:line 451
We are using Episerver commerce 9.24.1
I have seen this bug which is closed. http://world.episerver.com/support/Bug-list/bug/108959