Developer forum

Forum » Ecommerce - Standard features » Duplicate key errors on checkout

Duplicate key errors on checkout

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi guys,

We got customer reports about errors during checkout and found this on Log/eCom/CartV2/Errors:

2018-11-19 12:28:38.2645|ERROR|eCom/CartV2/Errors|Order <No order>: Unexpected exception GetContent() with the message: Cannot insert duplicate key row in object 'dbo.EcomOrderLines' with unique index 'DW_IX_OrderLines_OrderLineID'. The duplicate key value is (OL14115502).

The statement has been terminated.

2018-11-19 12:32:45.3943|ERROR|eCom/CartV2/Errors|Order <No order>: Unexpected exception GetContent() with the message: Cannot insert duplicate key row in object 'dbo.EcomOrderLines' with unique

index 'DW_IX_OrderLines_OrderLineID'. The duplicate key value is (OL14116732).

The statement has been terminated.

2018-11-19 12:34:27.8494|ERROR|eCom/CartV2/Errors|Order <No order>: Unexpected exception GetContent() with the message: Cannot insert duplicate key row in object 'dbo.EcomOrderLines' with unique index 'DW_IX_OrderLines_OrderLineID'. The duplicate key value is (OL14117462). 

The statement has been terminated.

2018-11-19 15:51:09.1989|ERROR|eCom/CartV2/Errors|Order <No order>: Unexpected exception GetContent() with the message: Object reference not set to an instance of an object.

There are no records on EcomOrderLines for the three orderlines mentioned above.

This is pretty scary as we have a concurrency issue somehow. Could this be related to the load balancer that we're using? Or should DW be guaranteed to generate unique order line IDs and is the problem elsewhere?

Thanks!


Replies

 
Nicolai Pedersen
Reply

The number code runs out of DB and also checks if the number is used - so should be NLB agnostic.

Do you by any chance have any code that adds/removes orderlines?

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

>> Do you by any chance have any code that adds/removes orderlines?

Yeah, I think so. We have live integration and possibly other code that could affect the order's OrderLine collection. Are there known caveats here? Something I should watch out for?
 

 

You must be logged in to post in the forum