Am facing a wierd issue in IE alone, only when Akamai Caching is enabled. The issue does not occur always, it behaves in an inconsistent way.
On searching for something, at times, my Search functionality gets triggered twice for some reason. To prevent multiple form submission in IE:
1. My form has an onSubmit() parameter & a Submit button
2. The submit button does not have any onClick().
3. I disable the submit button once it's hit.
At times, after the control comes out of the performExecute() of my searchCtrlCmd, a second call is again triggered. But this time, no new activity token is created in CTXMGMT, because of which this second call causes the duplicateKey exception pasted below.
The following create operation exception has occurred during processing: "javax.ejb.DuplicateKeyException: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=1;WCBE.CTXMGMT, DRIVER=4.7.112DSRA0010E: SQL State = 23505, Error Code = -803".". com.ibm.commerce.context.exception.BusinessContextServiceException: The following create operation exception has occurred during processing: "javax.ejb.DuplicateKeyException: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=1;WCBE.CTXMGMT, DRIVER=4.7.112DSRA0010E: SQL State = 23505, Error Code = -803".
If I refresh the page, I am directed to the expected page correctly (this time a new Activity Token is created, the value is one sequentially after the one that was supposed to have been created in the second call).
Could someone please give me an idea as to when exactly does an entry fall in CTXMGMT table & why was it not created during my 2nd submission?
Note: My Search command has been added in the exclusion list of DoubleClickMonitoredCommands, just to ensure that a double click would not cause any issue.
Thanks in advance,
This topic has been locked.
4 replies Latest Post - 2013-02-16T05:26:27Z by SystemAdmin
Pinned topic DuplicateKey exception in CTXMGMT table, when Akamai Caching is enabled
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-02-16T05:26:27Z at 2013-02-16T05:26:27Z by SystemAdmin
KiranYayavaram 2700017MC345 Posts
Re: DuplicateKey exception in CTXMGMT table, when Akamai Caching is enabled2012-12-12T05:41:59Z in response to KiranYayavaramThanks for the quick reply Kiran.
We had seen that tech note, but the scenario seems to be quite different from what we face.
We do not have any session timeout happening here in the meantime, but the tech note has mentioned about that and the error code also seems to be different from what we get.
Our environment is 184.108.40.206.
We replaced comments:
/*Some comment*/ some code /*Another comment*/ another code
//Some comment some code //Another comment another code
and the double-submit behaviour stopped, I think IE has some problems with this /*comments*/
Re: DuplicateKey exception in CTXMGMT table, when Akamai Caching is enabled2013-02-16T05:26:27Z in response to SystemAdminHi All,
Just thought of publishing workaround we identified for this issue.
The command causing the issue is a browse command & hence does not require a new user object to be created for each user invoking it. Hence, we made our command generic by overriding the isGeneric() to return true. Since a new user object is not created for generic users, the CTXMGMT table is not accessed & the DuplicateKeyException would not occur.