Direct links to fixes
APAR status
Closed as program error.
Error description
Sample stack: [10/28/13 9:35:55:869 EDT] 0000009f CommerceSrvr E com.ibm.commerce.webcontroller.WebControllerHelper commitRequestProcess(RequestHandle,boolean,boolean,boolean CMN0409E: The following error occurred during processing: "com.ibm.commerce.context.exception.BusinessContextServiceExcept ion: The following create operation exception has occurred during processing: "javax.ejb.DuplicateKeyException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL130318233219440' defined on 'CTXMGMT'.DSRA0010E: SQL State = 23505, Error Code = 20,000".". com.ibm.commerce.context.exception.BusinessContextServiceExcepti on: The following create operation exception has occurred during processing: "javax.ejb.DuplicateKeyException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL130318233219440' defined on 'CTXMGMT'.DSRA0010E: SQL State = 23505, Error Code = 20,000". at com.ibm.commerce.component.contextserviceimpl.ActivityTokenProce ssor.persistActivityToken(ActivityTokenProcessor.java:183) at com.ibm.commerce.component.contextserviceimpl.BusinessContextSer viceImpl.persistActivityToken(BusinessContextServiceImpl.java:15 91) at com.ibm.commerce.component.contextserviceimpl.BusinessContextSer viceImpl.endRequest(BusinessContextServiceImpl.java:749) at com.ibm.commerce.component.contextservice.objimpl.BusinessContex tServiceWrapperBeanBase.endRequest(BusinessContextServiceWrapper BeanBase.java:199) Caused by: javax.ejb.DuplicateKeyException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL130318233219440' defined on 'CTXMGMT'.DSRA0010E: SQL State = 23505, Error Code = 20,000 One possible scenario that can lead to this exception: 1. A generic user makes a request to the server, the command executed forces the creation of a guest user (isGeneric=false) 2. At the same time, from the same browser and before the first request returns a response, the shopper makes another request for another command which also requires a guest user (isGeneric=false) 3. At the end of each request, both requests try to persist the same token_id to the CTXMGMT table and a DuplicateKeyException occurs.
Local fix
Update the storefront to ensure that a browser running with the generic user is not allowed to start multiple requests in parallel that require guest users
Problem summary
USERS AFFECTED: WebSphere Commerce 7 users issuing simultaneous requests that require creation of a guest user (i.e. Ajax) PROBLEM ABSTRACT: DuplicateKey exception for CTXMGMT table when persisting generic business context is not descriptive enough BUSINESS IMPACT: Helps in troubleshooting DuplicateKeyException errors for CTXMGMT table RECOMMENDATION:
Problem conclusion
Additional information will be displayed in the log to help troubleshoot this DuplicateKeyException. Error code CMN0425E "Activity <activityId> already exists in the CTXMGMT table with different callerId, runAsId, or storeId. Please check whether concurrent requests are called to generate multiple guest users." ------------------------------------------------------------- The latest available maintenance information can be obtained from the Recommended Fixes for WebSphere Commerce technote: http://www.ibm.com/support/docview.wss?rs=3046&uid=swg21261296
Temporary fix
Comments
APAR Information
APAR number
JR48874
Reported component name
WC BUS EDITION
Reported component ID
5724I3800
Reported release
700
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
YesSpecatt / Serviceability
Submitted date
2013-12-18
Closed date
2014-03-17
Last modified date
2014-03-17
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
WC BUS EDITION
Fixed component ID
5724I3800
Applicable component levels
R700 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYSYL","label":"WebSphere Commerce Enterprise"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
17 March 2014