SAP Knowledge Base Article - Preview

3739841 - How to prevent duplicate cart entry numbers using optimistic locking - SAP Commerce Cloud

Symptom

  • Duplicate Cart EntryNumber found.
  • 500 Internal Server Error occurs on cart page or during add-to-cart with following exception:

    IllegalStateException: Duplicate key N (attempted merging values ...) from java.util.stream.Collectors.toMap.

  • java.util.stream.Collectors.duplicateKeyException can also be observed in stack traces.

**Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.**


Read more...

Environment

SAP Commerce Cloud, 2211.41 or newer

Product

SAP Commerce Cloud all versions

Keywords

duplicate entrynumber, optimistic locking, commercefacades, addToCart, deprecated , KBA , CEC-SCC-COM-BBA-ACC , Accelerator , CEC-SCC-COM-BCA-ACC , B2C Accelerator , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.