OmsSever failure to start due to foreign key constraint violation
book
Article ID: KB0073905
calendar_today
Updated On:
Products
Versions
TIBCO Fulfillment Order Management
4.x
Description
Below exception is thrown when trying to start omsServer instance: === Invocation of init method failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [insert into OMS_ROUTER_TBL (orchestrator, msgId, nodeid, orderId) values (?, ?, ?, ?)]; constraint [OMSTENANT1.FK_OMSRTRTBL_ORDR]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch ===
Issue/Introduction
This article deals with OmsServer failure to start due to foreign key constraint violation in OMS_ROUTER_TBL table.
Environment
ALL
Resolution
Connect to the tenant database and execute below queries: ---- 1.select * from OMS_ROUTER_TBL where ORDERID NOT IN(select ORDERID from ORDERS); 2.select * from OMS_ROUTER_TBL where ORDERID NOT IN(select ORDERID from ORDERS) and NODEID='MEMBER11'; ----
If null is returned, then: 1/Check the property "com.tibco.af.oms.router.recoveryFileFolderPath" in ConfigValues_OMS.xml. 2/ Navigate to the directory configured in this property. Default location is "$AF_HOME/roles/routerRecoveryFileFolder" directory. 3/ Delete any .dat file present at this location.