Try our conversational search powered by Generative AI!

Error in Catalog import

Vote:
 

In our epi commerce project we have approximately 400.000 products. These products are added/updated bij uploading zipped catalog.xml packages onto the service api (in batches of 2000 products).

Our import was working fine, until we got some timeout exceptions. After fixing the timeout problems (seems we were keeping up to 20 versions of some products) we now get the exception displayed below. (from the error log)

Does anyone have any idea what could be causing this?

Starting import...
Start importing catalog properties
Importing catalog Products
Finished importing catalog properties
Start importing catalog nodes
Finished importing catalog nodes
Start importing catalog entries
Imported catalog entries: 200 of 2000.
Imported catalog entries: 400 of 2000.
There is no Original data to access.
at System.Data.DataRow.GetOriginalRecordNo()
at System.Data.DataRow.GetRecordFromVersion(DataRowVersion version)
at System.Data.DataRow.get_Item(String columnName, DataRowVersion version)
at Mediachase.Commerce.TypedTableBaseExtensions.CatalogIdChanged(DataRow dataRow)
at Mediachase.Commerce.Catalog.Managers.CatalogEntryManager.<>c.b__14_1(CatalogEntryRow e)
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Mediachase.Commerce.Catalog.Managers.CatalogEntryManager.SaveCatalogEntry(CatalogEntryDto dataset)
at Mediachase.Commerce.Catalog.Impl.CatalogContextImpl.SaveCatalogEntry(CatalogEntryDto dto)
at Mediachase.Commerce.Catalog.ImportExport.CatalogImportExport.SaveEntryDto(CatalogEntryDto workingCatalogEntryDto, Dictionary`2 metaObjectsList, Dictionary`2 priceGroups, Dictionary`2 warehouseInventories)
at Mediachase.Commerce.Catalog.ImportExport.CatalogImportExport.ReadEntries(Guid applicationId, Int32 catalogId, XmlReader reader, String baseFilePath, Int32 totalCount, String defaultCurrency, Boolean overwrite, IEnumerable`1 catalogLanguages)
at Mediachase.Commerce.Catalog.ImportExport.CatalogImportExport.Import(Stream input, Guid applicationId, String baseFilePath, Boolean overwrite)
at EPiServer.ServiceApi.Commerce.Jobs.CatalogImportJob.<>c__DisplayClass7.b__5()
at EPiServer.ServiceApi.Commerce.Jobs.CatalogImportJob.WithApplicationId(Guid applicationId, Action action)
at EPiServer.ServiceApi.Commerce.Jobs.CatalogImportJob.DoImport(String[] stages, Int32 stageIndex, String sourceFile, String sourceDirectory)
at EPiServer.ServiceApi.Commerce.Jobs.CatalogImportJob.ExecuteJob(Guid jobId)

#157814
Sep 22, 2016 16:43
Vote:
 

We are using the following versions:

episerver.cms.core               9.11.0
episerver.commerce(.core)   9.19.0

#157815
Sep 22, 2016 16:46
Vote:
 

For those interested.

This happended only on our accept server and only a few products caused this problem.

After a rather large proces of elimination I ended up with an xml import file containing 2 products. Nothing special about these products on first glance, one was in the system already, one not.
When importing this file the error occurred as expected.

But then after splitting the file up in two files (one file for each product) both files were imported fine. And then the file containing 2 products could be imported fine too..
This solved the problem, but I still have no clue what the problem might have been.

#162078
Oct 10, 2016 14:47
Vote:
 

Hi Mark and the rest of you.

We are also seing this problem in Episerver.Commerce.Code 9.23.0. Are there anybody out there who have an explanation and a solution to the problem?

Regards

Anders

#173422
Dec 23, 2016 13:05
Vote:
 

Hi again

I have found the issue with our Catalog.XML file that caused this issue. There error is not very helpfull, so I would hope that Episerver could do something to give a better error message in this case.

The stacktrace that we get is this:

System.Data.VersionNotFoundException: There is no Original data to access.
   at System.Data.DataRow.GetOriginalRecordNo()
   at System.Data.DataRow.get_Item(String columnName, DataRowVersion version)
   at Mediachase.Commerce.TypedTableBaseExtensions.CatalogIdChanged(DataRow dataRow)
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Mediachase.Commerce.Catalog.Managers.CatalogNodeManager.SaveCatalogNode(CatalogNodeDto dataset)
   at Mediachase.Commerce.Catalog.ImportExport.CatalogImportExport.ReadNodes(Guid applicationId, Int32 catalogId, XmlReader reader, String baseFilePath, Int32 totalCount, Boolean overwrite, ImportCatalogNodeCache relationCache, IEnumerable`1 catalogLanguages)
   at Mediachase.Commerce.Catalog.ImportExport.CatalogImportExport.Import(Stream input, Guid applicationId, String baseFilePath, Boolean overwrite)

We have multiple product catalogs in our Commerce database.

The problem was, that one of the Nodes in the Catalog.xml that we were trying to import, had the same <Code> as one of the catalog nodes in one of the other catalogs. That's not very obvious from the error message :)

Regards

Anders

#173425
Dec 23, 2016 14:27
Vote:
 

Hi,

Thank you for your feedback, we will look into this to see if we can improve the error message (However this will be low priority bug ;) )

Merry Christmas and happy new year to you all!

Regards,

/Q

#173431
Dec 25, 2016 20:34
Vote:
 

Hi,

I could not reproduce the problem. When I try to import a second catalog with a node which has same code as an existing node in another catalog, I get this warning:

12/27/2016 12:01:03 PM: Warning - Node with code 'Automotive' already exists; skipping since overwrite is false.

If the overwrite flag is turned on then the import succeeded, but the node will be "moved" to the second catalog.

Can you provide a catalog which can reproduce the issue?

Regards,

/Q

#173442
Dec 27, 2016 12:04
Vote:
 

Hi Quan

I was actually also expecting that a node would be moved from one catalog to the other, but that was not what we experienced.

Can the issue be related to language?

Our Episerver solution have the following languages enabled: en, da, nl, no, sv. But each catalog only have two languages: En and another language.

Example:

Catalog 1: Default language: en, Enabled languages: en, da

Catalog 2: Default language: en, Enabled languages: en, nl

So in this siutation, Episerver would need to move a CatalogNode (or Entry) from languages en+da to the languages en+nl. Could that be what is causing the problems?

Regards

Anders

#173550
Jan 02, 2017 13:02
Vote:
 

The node itself should be language independent - it should be the default language of the catalog. Only the metaobjects attached to the node should care about the language - but that does not reflect in the stacktrace. I would suggest you to contact our developer support service with the catalogs you are using. Note that if this is a bug then it will not cost you a ticket.

Regards,

/Q

#173551
Jan 02, 2017 13:37
Vote:
 

Hi Quan

Thank you for your help.

Actually we don't want the nodes or entries to move from catalog to catalog, so we are not interrested in the "bug" being fixed, we would just have liked a more clear error message :) 

We are happy that Episerver stopped the import in this situation, because if it had actually started to move existing nodes from one catalog to another, we may not have found the real problem: In our situation, the problem was in the exported data from InRiver PIM. We need the PIM system to export catalogs for each of our countries in a completely independent way with no overlap. In the PIM system, we were supposed to specify a prefix that would ensure that the generated Code was different between each catalog, but that was not configured correctly in PIM, so it was trying to mix the catalogs in a way that was not correct.

If Episerver had allowed this mix, it may have taken further time for us to discover this bug in the exported data.

Our major problem was, that it took us some time to understand what actually caused the error message, because that was not clear based on the exception and stacktrace in the logfile.

Regards

Anders

#173552
Jan 02, 2017 14:18
Vote:
 

Hi,

To improve the error/log messages we need to know/verify when does it happen - that's why the catalogs are needed. You can contact our developer support service and refer to bug COM-3599. 

Regards,

/Q

#173553
Jan 02, 2017 14:38
Vote:
 

Hi Quan

Ok, I will ask my customer, if I may send some Catalog.xml files to your developer support.

Regards

Anders

#173554
Jan 02, 2017 14:39
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.