Developer forum

Forum » Ecommerce - Standard features » Issue rebuilding index

Issue rebuilding index

Terri Donahue
Terri Donahue
Reply

Hi Team,

We upgraded a solution from Dw 9.3.3 to Dw 9.10.4 this morning. The product indexer will not run. The error being returned when trying to run the index is:

Product index builder experienced a fatal error.. System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.    at System.Data.SqlClient.SqlBuffer.get_String()    at Dynamicweb.Ecommerce.Indexing.ProductIndexBuilder.LoadOrderCounts(SqlConnection connection, Tracker tracker)    at Dynamicweb.Ecommerce.Indexing.ProductIndexBuilder.Build(IIndexWriter writer, Tracker tracker)

 


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
This post has been marked as an answer

Hi Terri,

Sounds like a data issue. The method that crashes queries the order table like this:

SELECT [OrderLanguageId], [OrderLineProductId], ISNULL([OrderLineProductVariantId], ''), COUNT([OrderID])                     FROM [EcomOrderLines]                     JOIN [EcomOrders] ON [OrderId] = [OrderLineOrderId]                     WHERE                         [OrderLineProductId] IS NOT NULL                         AND [OrderLineProductId] > ''                         AND [OrderComplete] = 1                         AND [OrderDeleted] = 0 GROUP BY [OrderLanguageId], [OrderLineProductId], ISNULL([OrderLineProductVariantId], '')

and then assumes each column has a value.

It could be that one of the fields for some orders is null and that the code trips over it. If that's true, fixing your data might fix this issue.

It looks like you could skip the order count for the time being by changing the index setting SkipAllExtendedFields to true for the time being. That means it'll also skip translation stuff and "BoughtWithProducts" info but that might be acceptable for you.

Imar

 

Votes for this answer: 1
 
Terri Donahue
Terri Donahue
Reply

This has been addressed. There was missing data after the upgrade.

 

You must be logged in to post in the forum