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

A forum where issues related to the DataPort utility can be discussed.
Post Reply
scooter85
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 50
Joined: Wed Apr 15, 2009 2:41 pm

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

Post by scooter85 » Thu Feb 03, 2011 4:13 pm

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)

User avatar
Humannature
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 31
Joined: Thu Mar 12, 2009 10:47 pm

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

Post by Humannature » Fri Feb 11, 2011 12:40 pm

Newer Post Started With Same Problems

viewtopic.php?f=61&t=14953

User avatar
Humannature
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 31
Joined: Thu Mar 12, 2009 10:47 pm

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

Post by Humannature » Fri Feb 11, 2011 12:43 pm

Sorry, here is the correct link to the newer post.

viewtopic.php?f=61&t=14939

scooter85
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 50
Joined: Wed Apr 15, 2009 2:41 pm

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

Post by scooter85 » Wed Mar 09, 2011 2:51 pm

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.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

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

Post by jmestep » Wed Mar 09, 2011 4:02 pm

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.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

scooter85
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 50
Joined: Wed Apr 15, 2009 2:41 pm

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

Post by scooter85 » Thu Mar 10, 2011 8:33 am

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.

User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

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

Post by Naveed » Fri Mar 11, 2011 8:02 am

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.

scooter85
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 50
Joined: Wed Apr 15, 2009 2:41 pm

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

Post by scooter85 » Fri Mar 11, 2011 9:48 am

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).

User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

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

Post by Naveed » Mon Mar 28, 2011 7:33 am

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 :)

scooter85
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 50
Joined: Wed Apr 15, 2009 2:41 pm

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

Post by scooter85 » Tue Mar 29, 2011 8:23 am

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!

Post Reply