Developer forum

Forum » Ecommerce - Standard features » Index build error : Data is Null

Index build error : Data is Null

Gaëtan Di Caro
Reply

Hello,

I'm having an issue running the product index on a solution. It systematically fails with this error :

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.ProcessProducts()
   at Dynamicweb.eCommerce.Indexing.ProductIndexBuilder.Build(IIndexWriter writer, Tracker tracker)

 

Any idea how to go further from there ? Looks like something is null when it shouldn't be, but with several thousands of products, it's not easy to pinpoint the problem.


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply
This post has been marked as an answer

Hi Gaetan,

 

Are you importing your products through Data Integration? We've run into similar issues in the past and the "fix" was to compare the imported data against a product created in the backend.

 

DW has some fields that are nullable, while others must not be. You seem to be hitting at least one of them. Once we started forcing some "empty" values rather than null, it worked for us.

 

Best Regards,

Nuno Aguiar

Votes for this answer: 1
 
Gaëtan Di Caro
Reply

Ah yes, it seems that some wrong data got imported at some point and I had some products with a NULL ProductName. I removed them and now it works.

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Great, glad I could help.

 

You must be logged in to post in the forum