Java.sql.SQLException: ORA-02049 Error Occurs When Multiple Users Are Working on Stock Counts (Doc ID 1435764.1)

Last updated on DECEMBER 22, 2016

Applies to:

Oracle Retail Store Inventory Management - Version 13.2.1 to 13.2.3 [Release 13.2]
Information in this document applies to any platform.

Symptoms

In Store Inventory Management (SIM), when multiple users are working on different stock counts at the same time, some operations fail (taking snapshot, deleting stock count, confirming stock count etc.,) because of a lock on the whole STOCK_COUNT table.

The following error can be seen in the log files:

java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for lock



Steps to recreate:

  1. Create a product group, schedule it, generate stock count data.
  2. Create one more stock count for another store (also based on the same product group).
  3. Try to take snapshot at the same time on different instances. If one of the 2 stock counts is locking STOCK_COUNT table (for update), the second one fails to take the snapshot.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms