Page 1 of 1

Strange errors since moving to 7.0.5

Posted: Thu Nov 04, 2010 11:24 pm
by compunerdy
Anyone know the cause of these or where to look?

Error adjusting inventory levels for order number 24483 An item with the same key has already been added.

An error has occured at http://www.thecustomsabershop.com/Basket.aspx Exception of type 'System.Web.HttpUnhandledException' was thrown.; Attempted to divide by zero.

Re: Strange errors since moving to 7.0.5

Posted: Mon Dec 13, 2010 2:03 pm
by triplw
I am getting an occasional "An item with the same key has already been added." since upgrading to 7.0.5 also. I think it may have to do with kitted products that I have copied to make another product but haven't really spent time testing.

Re: Strange errors since moving to 7.0.5

Posted: Wed Jan 26, 2011 3:06 pm
by mmcnatt
We just updated to version 7.06 from 7.04 and we are seeing these same errors:

1/26/2011 10:04:43 AM Error Error adjusting inventory levels for order number xxxx An item with the same key has already been added.

has anybody figured this out?

Thanks

Re: Strange errors since moving to 7.0.5

Posted: Wed Jan 26, 2011 5:27 pm
by compunerdy
I never got it resolved. I tried to file a report on it but you cannot do that anymore without paying for support it seems.

Re: Strange errors since moving to 7.0.5

Posted: Wed Jul 13, 2011 8:12 am
by deverill
It's not just Kits. We don't use them and are getting several entries of this error a day.
7/11/2011 10:14:26 AM Error An error has occured at [various pages] An item with the same key has already been added.

Re: Strange errors since moving to 7.0.5

Posted: Thu Aug 04, 2011 10:06 am
by vsammons
Anybody ever get this resolved? It seems we all keep dealing with the issues, but someone that is TRYING to order is having issues. THis is costing us money... and possibly a new customer!

Re: Strange errors since moving to 7.0.5

Posted: Thu Aug 04, 2011 12:12 pm
by azar
Are you making a lot of code changes? This error usually happens after you make code changes. It is an error within asp.net application pool and usually gets resolved quickly after all the new code files are re-compiled. The solution is to recycle the application pool after each code change.

Re: Strange errors since moving to 7.0.5

Posted: Tue Aug 09, 2011 6:07 pm
by compunerdy
Still get these...

Error Error adjusting inventory levels for order number xxxx An item with the same key has already been added.

Anyone looking into it?

Re: Strange errors since moving to 7.0.5

Posted: Tue Sep 13, 2011 6:39 am
by eileen
I am getting the same error. Plugables looked at my log file, and this is their take:
This seems like a bug in AbleCommerce URLRewriter. The error can not be reliably produced every time but the exception details show that the URL Rewriter module of AbleCommerce, which has been added in the latest versions, fails to maintain unique keys in one of its internal collections. You should contact AbleCommerce with these error details.

ERROR 2011-09-11 16:59:03,621 406ms Object a - An error has occured at http://www.backdesigns.com/Why-you-dont ... t-W14.aspx
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item)
at System.Collections.ObjectModel.KeyedCollection`2.InsertItem(Int32 index, TItem item)
at CommerceBuilder.Catalog.DefaultUrlRewriter.InitializeCache()
at CommerceBuilder.Catalog.DefaultUrlRewriter.a(String A_0)
at CommerceBuilder.Catalog.DefaultUrlRewriter.RewriteUrl(String sourceUrl)
at CommerceBuilder.Services.c.c(Object A_0, EventArgs A_1)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
ERROR 2011-09-11 16:59:03,637 421ms Object a - An error has occured at http://www.backdesigns.com/Salli-Saddle ... -C156.aspx
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item)
at System.Collections.ObjectModel.KeyedCollection`2.InsertItem(Int32 index, TItem item)
at CommerceBuilder.Catalog.DefaultUrlRewriter.InitializeCache()
at CommerceBuilder.Catalog.DefaultUrlRewriter.a(String A_0)
at CommerceBuilder.Catalog.DefaultUrlRewriter.RewriteUrl(String sourceUrl)
at CommerceBuilder.Services.c.c(Object A_0, EventArgs A_1)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Re: Strange errors since moving to 7.0.5

Posted: Mon Oct 22, 2012 4:39 pm
by moustafa
Has anyone found a resolution?

For one of my stores, I'm getting this error a lot. Here's my stack trace:

Code: Select all

ERROR 2012-10-17 09:42:15,956 1772501ms Object                 a                  - Error adjusting inventory levels for order number 96
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at CommerceBuilder.Orders.OrderDataSource.UpdateOrderStatus(Order order, OrderStatus newStatus)

Re: Strange errors since moving to 7.0.5

Posted: Mon Oct 22, 2012 4:47 pm
by ableExpert
Hi moustafa,
It seems your are trying to update the inventory level are you sure there are enough items for the product, you are updating?

Re: Strange errors since moving to 7.0.5

Posted: Mon Oct 22, 2012 4:49 pm
by moustafa
Yes, I'm sure. I'm running four AC stores and I'm quite familiar with how inventory management should work.

Re: Strange errors since moving to 7.0.5

Posted: Mon Oct 22, 2012 5:02 pm
by ableExpert
I think exact reason which trigger this issue can be identify by running the application in the same scenario on debug mode.You may also see this link may be this will be helpful for you
http://forums.asp.net/t/1730201.aspx/1