IBM Support

JR51699: DATAINTEGRITYVIOLATIONEXCEPTIONS ARE OCCASIONALLY THROWN

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In rare situations, for example after you migrate your system,
    you might see
    org.springframework.dao.DataIntegrityViolationException and
    exceptions that are similar to the following exception stack in
    the SystemOut.log file:
    org.springframework.dao.DataIntegrityViolationException:
    StatementCallback; SQL [
                    insert into LSW_USR_GRP_MEM_XREF(USER_ID,
    GROUP_ID)
                    SELECT LSW_USR_XREF.USER_ID, 5417
                    from LSW_USR_XREF where
                 (
    USER_ID IN (
                    select DISTINCT LSW_USR_XREF.USER_ID
                    from LSW_USR_GRP_MEM_XREF, LSW_USR_GRP_XREF,
    LSW_USR_XREF
                    where
                        LSW_USR_GRP_MEM_XREF.GROUP_ID =
    LSW_USR_GRP_XREF.GROUP_ID
                        AND LSW_USR_XREF.USER_ID =
    LSW_USR_GRP_MEM_XREF.USER_ID
                        AND LSW_USR_GRP_XREF.GROUP_NAME =
    'wab_lic_produktieteam'
                )
    OR
    USER_ID IN (
                    select DISTINCT LSW_USR_XREF.USER_ID
                    from LSW_USR_GRP_MEM_XREF, LSW_USR_GRP_XREF,
    LSW_USR_XREF
                    where
                        LSW_USR_GRP_MEM_XREF.GROUP_ID =
    LSW_USR_GRP_XREF.GROUP_ID
                        AND LSW_USR_XREF.USER_ID =
    LSW_USR_GRP_MEM_XREF.USER_ID
                        AND LSW_USR_GRP_XREF.GROUP_NAME =
    'wab_lic_produktieteam_S_f86a73f7-b540-47ca-af3c-36c969e51395.42
    28ad52-4
    a8b-431a-a85b-8990cffa00d5'
                )
    )
     AND USER_ID IN (
                    select DISTINCT LSW_USR_XREF.USER_ID
                    from LSW_USR_ATTR, LSW_USR_XREF
                    where
                        LSW_USR_XREF.USER_ID = LSW_USR_ATTR.USER_ID
                        AND USER_ATTR_DEF_ID =
    'e673bd96-ab12-4c45-b3fa-655a8d499be5' and ATTR_VALUE = 'true'
                )
     AND USER_ID IN (
                    select DISTINCT LSW_USR_XREF.USER_ID
                    from LSW_USR_ATTR, LSW_USR_XREF
                    where
                        LSW_USR_XREF.USER_ID = LSW_USR_ATTR.USER_ID
                        AND USER_ATTR_DEF_ID =
    '2d05f0e4-e0c3-4234-bebd-46e4a4d28986' and ATTR_VALUE = 'true'
                )
    ]; DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505,
    SQLERRMC=2;VIRTUSER.LSW_USR_GRP_MEM_XREF, DRIVER=4.11.69; nested
    exception is com.ibm.websphere.ce.cm.DuplicateKeyException:
    DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505,
    SQLERRMC=2;VIRTUSER.LSW_USR_GRP_MEM_XREF, DRIVER=4.11.69
            at
    org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTransla
    tor.tran
    slate(SQLErrorCodeSQLExceptionTranslator.java:292)
            at
    org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.
    java:407
    )
            at
    org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.j
    ava:522)
            at
    org.springframework.jdbc.core.simple.SimpleJdbcTemplate.update(S
    impleJdb
    cTemplate.java:237)
            at
    com.lombardisoftware.server.core.DynamicGroupHelper.assignUsersR
    ecursive
    ly(DynamicGroupHelper.java:215)
            at
    com.lombardisoftware.server.core.DynamicGroupHelper.refreshMembe
    rship(Dy
    namicGroupHelper.java:117)
            at
    com.lombardisoftware.bpd.component.flowcomponent.activity.worker
    .BPDActi
    vityWorker.resolveParticipantIfNecessary(BPDActivityWorker.java:
    2210)
            at
    com.lombardisoftware.bpd.component.flowcomponent.activity.worker
    .BPDActi
    vityWorker.resolveParticipantAddress(BPDActivityWorker.java:2169
    )
            at
    com.lombardisoftware.bpd.component.flowcomponent.activity.worker
    .BPDActi
    vityWorker.resolveParticipantAddress(BPDActivityWorker.java:2156
    )
            at
    com.lombardisoftware.bpd.component.flowcomponent.activity.worker
    .BPDActi
    vityWorker.resolveSendToCustom(BPDActivityWorker.java:1991)
            at
    com.lombardisoftware.bpd.component.flowcomponent.activity.worker
    .BPDActi
    vityWorker.resolveTaskSendToList(BPDActivityWorker.java:1891)
            at
    com.lombardisoftware.bpd.component.flowcomponent.activity.worker
    .BPDActi
    vityWorker.resolveSendTo(BPDActivityWorker.java:1054)
            at
    com.lombardisoftware.bpd.component.flowcomponent.activity.worker
    .BPDActi
    vityWorker.createTask(BPDActivityWorker.java:703)
            at
    com.lombardisoftware.bpd.component.flowcomponent.activity.worker
    .BPDActi
    vityWorker.executeImplementation(BPDActivityWorker.java:490)
            at
    com.lombardisoftware.bpd.component.flowcomponent.activity.worker
    .BPDActi
    vityWorker.doWork(BPDActivityWorker.java:270)
            at
    com.lombardisoftware.bpd.runtime.engine.FlowObjectExecutionTreeN
    ode.doWo
    rk(FlowObjectExecutionTreeNode.java:371)
            at
    com.lombardisoftware.bpd.runtime.engine.BPDEngine.executeTreeNod
    e(BPDEng
    ine.java:337)
            at
    com.lombardisoftware.bpd.runtime.engine.BPDEngine.resume(BPDEngi
    ne.java:
    180)
      ....
    The stalled BPD instances are in state running, but no active
    Task for these BPD instances exists.
    

Local fix

Problem summary

  • When IBM BPM refreshes dynamic group membership, it deletes all
    records in LSW_USR_GRP_MEM_XREF that belong to this group and
    inserts the records in LSW_USR_GRP_MEM_XREF that make up this
    group. This refresh happens whenever an activity in a business
    process definition (BPD) that uses a dynamic group is activated
    and the associated task is created.
    
    If two threads refresh the same group concurrently, the delete
    operation usually creates a lock that blocks the second thread
    until the first thread has committed its transaction. However,
    if no record for this group exists in LSW_USR_GRP_MEM_XREF, the
    second thread is not blocked and the delete operation has no
    effect and both threads attempt to insert the same records into
    LSW_USR_GRP_MEM_XREF, which causes a
    DataIntegrityViolationException or DuplicateKeyException.
    

Problem conclusion

  • A fix is/will be available that catches and ignores the
    DataIntegrityViolationException because it does no harm.
    This exception simply means that the records that the actual
    thread attempted to insert have already been inserted by another
    thread.
    
    On Fix Central (http://www.ibm.com/support/fixcentral), search
    for JR51699:
    
    1. Select IBM Business Process Manager with your edition from
      the product selector, the installed version to the fix pack
      level, and your platform, and then click Continue.
    
    2. Select APAR or SPR, enter JR51699, and click Continue.
    
    When you download fix packages, ensure that you also download
    the readme file for each fix. Review each readme file for
    additional installation instructions and information about the
    fix.
    

Temporary fix

  • Not applicable
    

Comments

APAR Information

  • APAR number

    JR51699

  • Reported component name

    BPM ADVANCED

  • Reported component ID

    5725C9400

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2014-11-03

  • Closed date

    2015-01-12

  • Last modified date

    2015-01-12

  • 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

    BPM STANDARD

  • Fixed component ID

    5725C9500

Applicable component levels

  • R850 PSY

       UP

  • R855 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSFTDH","label":"IBM Business Process Manager Standard"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
12 January 2015