Cannot Re-Calculate A Secondary Charge Shipment, Error: Exception Cannot add the S_SHIP_UNIT record. S_SHIP_UNIT_GID must be unique. (Doc ID 1330676.1)

Last updated on SEPTEMBER 08, 2016

Applies to:

Oracle Transportation Management - Version: 6.2.1 to 6.2.3 - Release: 6.2 to 6.2
Information in this document applies to any platform.

Symptoms

On OTM version 6.2.1 when an agent is run to recalculate a Secondary Charge Shipment, the agent fails with the following error:

ERROR
-----------------------
Exception Cannot add the S_SHIP_UNIT record. S_SHIP_UNIT_GID must be unique.
java.sql.BatchUpdateException: ORA-00001: unique constraint (GLOGOWNER.PK_S_SHIP_UNIT) violated


java.sql.BatchUpdateException: ORA-00001: unique constraint (GLOGOWNER.PK_S_SHIP_UNIT) violated

at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:629)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9447)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:211)
at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:210)
at glog.util.jdbc.SqlUpdate.processBatch(SqlUpdate.java:142)
at glog.util.jdbc.SqlUpdate.resetArguments(SqlUpdate.java:238)
at glog.util.jdbc.SqlUpdate.resetArguments(SqlUpdate.java:161)
at glog.util.jdbc.SqlUpdate.execute(SqlUpdate.java:90)
at glog.util.beandata.BeanDataInserter.insertDBBatch(BeanDataInserter.java:358)
at glog.util.beandata.BeanDataInserter.insertDB(BeanDataInserter.java:302)
at glog.util.beandata.BeanDataInserter.insert(BeanDataInserter.java:197)
at glog.util.beandata.BeanDataInserter.insert(BeanDataInserter.java:232)
at glog.business.util.EntitySaver.insert(EntitySaver.java:252)
at glog.business.util.Persistence.insertupdate(Persistence.java:336)
at glog.business.shipment.PlanningObjectCommitter.commitTSShipUnits(PlanningObjectCommitter.java:583)
at glog.business.shipment.ShipmentUpdateSessionBean.commitShipmentGraphUnlocked(ShipmentUpdateSessionBean.java:1514)
at glog.business.shipment.ShipmentUpdateSessionBean.commitShipmentGraph(ShipmentUpdateSessionBean.java:1309)
at glog.business.shipment.ShipmentUpdateSessionServerSideEJBWrapper.commitShipmentGraph(ShipmentUpdateSessionServerSideEJBWrapper.java:344)
at glog.business.shipment.ShipmentUpdateSessionBean.commitShipmentGraph(ShipmentUpdateSessionBean.java:1845)
at glog.business.shipment.ShipmentUpdateSessionServerSideEJBWrapper.commitShipmentGraph(ShipmentUpdateSessionServerSideEJBWrapper.java:303)
at glog.business.shipment.ShipmentUpdateSessionHome_qj7mtr_EOImpl.commitShipmentGraph(ShipmentUpdateSessionHome_qj7mtr_EOImpl.java:1018)
at glog.business.action.SecondaryChargeActionExecutor.recalculateSCShipmentsCostForShipment(SecondaryChargeActionExecutor.java:602)
at glog.business.session.SecondaryChargeActionSessionBean.recalculateSCShipmentsCostForShipment(SecondaryChargeActionSessionBean.java:261)
at glog.business.session.SecondaryChargeActionSessionServerSideEJBWrapper.recalculateSCShipmentsCostForShipment(SecondaryChargeActionSessionServerSideEJBWrapper.java:374)
at glog.business.session.SecondaryChargeActionSessionServerSideEJBWrapper_usazhd_EOImpl.recalculateSCShipmentsCostForShipment(SecondaryChargeActionSessionServerSideEJBWrapper_usazhd_EOImpl.java:68)
at glog.server.agent.business.shipment.RecalcSecondaryCharge.execute(RecalcSecondaryCharge.java:48)
at glog.server.agent.ActionWorkflow.execute(ActionWorkflow.java:49)
at glog.server.workflow.WorkflowSessionBean.execute(WorkflowSessionBean.java:64)
at glog.server.workflow.WorkflowSessionServerSideEJBWrapper.execute(WorkflowSessionServerSideEJBWrapper.java:38)
at glog.server.workflow.WorkflowSessionServerSideEJBWrapper_61kh96_EOImpl.execute(WorkflowSessionServerSideEJBWrapper_61kh96_EOImpl.java:206)
at glog.server.workflow.WorkflowManager.execute(WorkflowManager.java:352)
at glog.server.workflow.Trigger.trigger(Trigger.java:122)
at glog.util.event.MemoryEventQueueRunnable.processEvent(MemoryEventQueueRunnable.java:146)
at glog.util.event.MemoryEventQueueRunnable.run(MemoryEventQueueRunnable.java:98)
at glog.util.event.EventThread.run(EventThread.java:82)
at java.lang.Thread.run(Thread.java:619)
[agentPlanning - 3]


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Have a Shipment Agent that will recalculate Secondary Charge Shipments.
2. Have a Shipment linked to a Secondary Charge Shipment.
3. Trigger the agent by altering the original shipment.
4. The error is encountered.

NOTE:
This note is only for Shipments with a Secondary Charge Shipment attached directly to the Shipment. This note is not for Secondary Charge Shipments attached to Shipment Groups, for more details please see "<Note 1393946.1>".

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