Developer forum

Forum » Dynamicweb 10 » Errors processing prices in index in DW10 site upgrade from 9

Errors processing prices in index in DW10 site upgrade from 9

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

We're seeing the following in the logs for the index builder:

Error processing prices. System.Collections.Generic.KeyNotFoundException: The given key 'ProductDefaultUnitID' was not present in the dictionary.

   at Dynamicweb.Ecommerce.Indexing.ProductIndexBuilder.HandlePrices(String productId, String variantId, String languageId, IndexDocument document, CountryCollection countries, Currency defaultCurrency, List`1 allCurrencies)

   at Dynamicweb.Ecommerce.Indexing.ProductIndexBuilder.ProcessProducts(SqlConnection connection, IIndexWriter writer, Tracker tracker)

I don't see ProductDefaultUnitID anywhere in our setup. Is that a required field somewhere I need to add? Or is it tripping over casing? (It's called ProductDefaultUnitId in the database).

Imar


Replies

 
Michael Knudsen
Reply

Hello Imar,

- 'ProductDefaultUnitId' can't be NULL in DW10, so if you update all 'ProductDefaultUnitId' = NULL in EcomProducts, the error will disapears.

I had a similar issue this week and Morten Snedker was my hero :-)

Br. Michael Knudsen

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Thanks Michael. Are you sure it's the same thing? It doesn't seem to be a data issue, but a Lucene document issue or so where ProductDefaultUnitID is not in the indexed document.

Does your field list include ProductDefaultUnitID, either directly or from a SchemaExtender?

Imar

 
Michael Knudsen
Reply

Hello Imar,

- try remove the NULL values in 'ProductDefaultUnitId' (EcomProducts) and build the index again... and let me know if it isn't solved.

Br. Michael Knudsen

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Alright, will give that a try. The index takes hours to rebuild so will have to try tonight.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Just following up on this: setting ProductDefaultUnitId to none-null did indeed fix the issue (or at least one of the few we had :-) )

 

You must be logged in to post in the forum