My Oracle Support Banner

StaleObjectStateException Encountered In D1-CMCS Batch Run In Multithreaded (Doc ID 2798117.1)

Last updated on SEPTEMBER 19, 2022

Applies to:

Oracle Utilities Meter Data Management - Version to [Release 2.3 to 2.4]
Oracle Utilities Customer to Meter Base - Version and later
Information in this document applies to any platform.


On : version, Framework

StaleObjectStateException encountered in D1-CMCS Batch Run in Multithreaded

When running D1-CMCS base batch in multi-threaded run, it returns the error:


Error committing session's transaction
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.splwg.d1.domain.admin.measurementCycle.entities.MeasurementCycleSchedule_Per#MeasurementCycleSchedule_Id(measurementCycleId: [11], scheduleSelectionDate: 2020-01-14)].

The issue can be reproduced at will with the following steps:
1.Required Test Data:
Measurement Cycle
Measurement Cycle Route
Measurement Cycle Schedule
Measurement Cycle Schedule with no Measurement Cycle Schedule Routes yet
linked to it.
2.Run D1-CMCS batch in multi-threaded.
Expected result: Measurement Cycle Schedule Routes should be created for the non-pre-
generated Measurement Cycle Schedules w/ scheduled selection date <= batch
business date.
3.Check batch run tree. Batch run status is in error.
4.Some of the threads are in error and some are completed.


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.