PQ71645: DUPLICATE KEY EXCEPTIONS ARE BEING THROWN IN COMPLIANCE MODE WHEN AN EXISTING SESSION IS REQUESTED

A fix is available
WebSphere Application Server Version 4.0 Fix Pack 6 (Version 4.0.6)

APAR

APAR status
Closed as program error.

Error description
Customer is getting the following error on 3.5.5:
com.ibm.ejs.cm.portability.DuplicateKeyException: [IBM][CLI Driv
[DB2/SUN] SQL0803N  One or more values in the INSERT statement,
UPDATE statement, or foreign key update caused by a DELETE
statement are not valid because the primary key, unique constrai
or unique index identified by "2" constrains table "WAS.SESSIONS
rom having duplicate rows for those columns.  SQLSTATE=23505
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.sql.SQLException.<init>(SQLException.java:36)
at com.ibm.ejs.cm.portability.PortableSQLException.<init>
(PortableSQLException.java:22)
Customer is getting the following error on 3.5.5:com.ibm.ejs.cm.portability.DuplicateKeyException: [IBM][CLI Driv[DB2/SUN], SQL0803N One or more values in the INSERT statement,UPDATE statement, or foreign key update caused by a DELETEstatement are not valid because the primary key, unique constraior unique index identified by "2" constrains table "WAS.SESSIONSrom having duplicate rows for those columns. SQLSTATE=23505at java.lang.Throwable.fillInStackTrace(Native Method)at java.lang.Throwable.fillInStackTrace(Compiled Code)at java.lang.Throwable.(Compiled Code)at java.lang.Exception.(Compiled Code)at java.sql.SQLException.(SQLException.java:36)at com.ibm.ejs.cm.portability.PortableSQLException.(PortableSQLException.java:22)
Local fix
Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server -- Session      *
*                 Manager Users                                *
****************************************************************
* PROBLEM DESCRIPTION: Duplicate Key Exceptions are being      *
*                      thrown in compliance mode when an       *
*                      existing session is requested.          *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
In the 2.2 compliance mode the session manager creates one
session object per web module from the same HttpClient. The
session objects share the same session id in the different web
modules.  If multiple requests come in with an existing
session id in a different web module and the session does not
exist, there is a window where multiple threads serving this
different request could end up creating multiple session
objects in the same JVM and try to persist them to the database
resulting in DuplicateKeyExceptions. This multiple request could
be caused by double clicks or a multi frame jsp. This window is
Problem conclusion
This fix causes the session create operation to be synchronized
across multiple threads therefore avoiding multiple session
objects to be created within a web module for the same
HttpClient.
Temporary fix
PQ71645_test.jar
Comments
APAR information
APAR numberPQ71645
Reported component nameWEBSPHERE AE NT
Reported component ID5648C8402
Reported release350
StatusCLOSED PER
PENoPE
HIPERNoHIPER
Submitted date2003-03-04
Closed date2003-03-14
Last modified date2003-05-21

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:APAR is sysrouted FROM one or more of the following:

PQ72438PQ74406

Modules/Macros
SESSIONS
APAR is sysrouted TO one or more of the following:PQ72438PQ74406Modules/Macros

Fix information

Applicable component levels
R350 PSYUP











Document Information

Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, General
Software version: 350
Reference #: PQ71645
IBM Group: Software Group
Modified date: 2003-05-21