Page 1 of 1

Error: Object reference not set to an instance of an object

Posted: Thu Feb 03, 2011 4:13 pm
by scooter85
DataPort Version: 7.6.248
AbleCommerce for ASP.NET VERSION: 7.0.6.14312

I am trying to do a PRODUCT UPLOAD using the UPDATE MODE with Manual Mapping and using the custom match fields "ModelNumber".

I have been using this update option since it was added to the dataport without problem. But now I am getting the following error:

Importing 20 Products

Object reference not set to an instance of an object.
Update unsuccessful for Product
ProductId = 0
Name = 03-1283
Error message: Object reference not set to an instance of an object.

at CommerceBuilder.Products.Product.set_CustomUrl(String value)
at CommerceBuilder.DataClient.Api.ObjectHandlers.ImportHandler.ao(Object& A_0, Object A_1)
at CommerceBuilder.DataClient.Api.ObjectHandlers.ImportHandler.a(Array A_0, Type A_1, String A_2, String A_3, String A_4, Object A_5, w A_6, f A_7, c A_8, e A_9, String A_10)

Base Exception: Object reference not set to an instance of an object.
at CommerceBuilder.Products.Product.set_CustomUrl(String value)
at CommerceBuilder.DataClient.Api.ObjectHandlers.ImportHandler.ao(Object& A_0, Object A_1)
at CommerceBuilder.DataClient.Api.ObjectHandlers.ImportHandler.a(Array A_0, Type A_1, String A_2, String A_3, String A_4, Object A_5, w A_6, f A_7, c A_8, e A_9, String A_10)

Re: Error: Object reference not set to an instance of an object

Posted: Fri Feb 11, 2011 12:40 pm
by Humannature
Newer Post Started With Same Problems

viewtopic.php?f=61&t=14953

Re: Error: Object reference not set to an instance of an object

Posted: Fri Feb 11, 2011 12:43 pm
by Humannature
Sorry, here is the correct link to the newer post.

viewtopic.php?f=61&t=14939

Re: Error: Object reference not set to an instance of an object

Posted: Wed Mar 09, 2011 2:51 pm
by scooter85
I have over 5,000 sku's that need updated. I was using the DataPort UPDATE MODE to update the following fields:

InStock, InStockWarningLevel, AllowBackorder, VisibilityId, CostOfGoods

on a daily to weekly basis so my customers would know the items were available when they ordered them. I was doing this with a .csv file with only the following fields in my file:

Name, ModelNumber, InStock, InStockWarningLevel, AllowBackorder, VisibilityId, CostOfGoods

and using the ModelNumber as my match field. This was working great until a couple of months ago and I know I'm not doing anything different then before.

I am getting frustrated that there are no answers to this. Can someone shed some light on this for me? I am trying to update these fields manually and it’s impossible with over 5,000 sku’s.

Re: Error: Object reference not set to an instance of an object

Posted: Wed Mar 09, 2011 4:02 pm
by jmestep
I just ran into that with a client a few minutes ago. I had to download the product using the dataport and not delete any columns and then upload and it updated OK. I think he is going to experiment with deleting columns and see at what point it breaks.
I am going to post a bug.

Re: Error: Object reference not set to an instance of an object

Posted: Thu Mar 10, 2011 8:33 am
by scooter85
Judy,

Thanks for your help. I can't download all the products and upload them all as the file is to big (4.5 MB) and I know from past experience a lot of items and fields would be messed up on the upload. That is why I loved the new update mode with the ability to match product using the Model Number as the match field. This worked GREAT until we updated to the ASP.NET VERSION: 7.0.6.14312.

I hope they find a fix to this soon as I am tired of customers complaining about items being out of stock when they show in stock on the site.

Re: Error: Object reference not set to an instance of an object

Posted: Fri Mar 11, 2011 8:02 am
by Naveed
I was able to reproduce the issue, and fixed. The fix will however be available for next release of DataPort. The quick workaround is to add "CustomUrl" field in your list of fields. I am not sure how easy it is for you, but if you are not using the CustomUrls for any of your product then its just simple to add this field in the CSV header with empty or no value in records.

Re: Error: Object reference not set to an instance of an object

Posted: Fri Mar 11, 2011 9:48 am
by scooter85
The work around fix doesn't work for the UPDATE mode. I added the CustomUrls to the header in my .csv file and I get the following pop up when starting Upload.

No Product available for Import(Upload).

Re: Error: Object reference not set to an instance of an object

Posted: Mon Mar 28, 2011 7:33 am
by Naveed
No Product available for Import(Upload).
Actually you have to add a new column. Add the "CustomUrl" in the header, as well as add an empty value in all CSV rows for the corresponding column. If you will only add it to the header, it will corrupt the CSV format :)

Re: Error: Object reference not set to an instance of an object

Posted: Tue Mar 29, 2011 8:23 am
by scooter85
I was adding a new column at the end of the work sheet and saving as a CSV file. When I did the mapping of the file the "CustomUrl" showed as a new field but when I did the import I was still getting the "No Product Available" error. I went back and inserted a new column "CustomUrl" before the last column and saved as CSV file and all worked.

THANK YOU FOR YOUR HELP!