LLBLGen Pro V5.7 (5.7.7) RTM
.Net framework 4.6.2
Oracle 12 g
LLBLGen Runtime version 5.5.7.0
Table COLLECTIONS_SESSION has PK column COLLECTIONS_SESSION_ID that is filled in from sequence COLLECTIONS_SESSION_ID. Occasionally, the insert for this row fails because the NEXTVAL statement for the sequence generates a null. Same code block every minute of the day and yet sometimes it fails to generate the insert statement properly.
In the log I see this for the failures:
BEGIN SELECT COLLECTIONS_SESSION_ID.NEXTVAL INTO NULL FROM DUAL; INSERT INTO COLLECTIONS_SESSION (COLLECTIONS_SESSION_ID, SESSION_EMPLOYEE_ID, CONTAINER_TALLY_TOTAL, COIN_BAG_TALLY_TOTAL, FROM_TALLY_CLERK_ID, FROM_VEHICLE_ID, START_DTM, INSERTED_DTM, UPDATED_DTM) VALUES (NULL, 141307, 2, 0, 141542, 149, TO_DATE('20230720113726', 'YYYYMMDDHH24MISS'), TO_DATE('20230720114824', 'YYYYMMDDHH24MISS'), TO_DATE('20230720114824', 'YYYYMMDDHH24MISS')) ;END;
For the successful inserts, the insert statement looks like this:
BEGIN SELECT COLLECTIONS_SESSION_ID.NEXTVAL INTO 31168 FROM DUAL; INSERT INTO COLLECTIONS_SESSION (COLLECTIONS_SESSION_ID, SESSION_EMPLOYEE_ID, SESSION_FACID, CONTAINER_EVENT_ID, SESSION_STATUS_ID, CONTAINER_TALLY_TOTAL, COIN_BAG_TALLY_TOTAL, CONTAINERS_RECEIVED_TOTAL, COIN_BAGS_RECEIVED_TOTAL, TALLY_TOTAL_CHANGED, FROM_TALLY_CLERK_ID, FROM_VEHICLE_ID, START_DTM, INSERTED_DTM, UPDATED_DTM) VALUES (31168, 141307, 2002, 906, 1, 32, 12, 20, 0, 0, 141504, 11, TO_DATE('20230720151031', 'YYYYMMDDHH24MISS'), TO_DATE('20230720151127', 'YYYYMMDDHH24MISS'), TO_DATE('20230720151127', 'YYYYMMDDHH24MISS')) ;END;
What could be causing this random behavior?