Troubleshooting
Problem
Your IBM Sterling FulFillment Suite throws error YFC0001 when you create the UOMCode and UOMDescription as pl for UOM_TYPE='Quantity'.
Symptom
The following entry gets created in YFS_UOM table.
2014093018134034100 DEFAULT QUANTITY pl pl 0 30-SEP-14 30-SEP-14 admin admin YEntityServlet YEntityServlet
The second time, when you create the UOMCode and UOMDescription as pl for UOM_TYPE='Weight' you receive this error.
<Error ErrorCode="YFC0001"
ErrorDescription="Record already exists in the database."
ErrorRelatedMoreInfo="">
<Attribute Name="ErrorCode" Value="YFC0001"/>
<Attribute Name="ErrorDescription" Value="Record already exists
in the database."/>
<Attribute Name="SQLState" Value="23000"/>
<Attribute Name="TransactionIsolationLevel" Value="2"/>
<Attribute Name="Method" Value=""/>
<Attribute Name="SQLStatement" Value="PREPARED STATEMENT -
INSERT /*YANTRA*/ INTO YFS_UOM(UOM_KEY,ORGANIZATION_CODE,UOM_TYPE,UOM,UOM_DESCRIPTION,VOLUME_UOM,LOCKID,CREATETS,MODIFYTS,CREATEUSERID,MODIFYUSERID,CREATEPROGID,MODIFY
PROGID) values ( '2014093018140734103','DEFAULT','WEIGHT','pl','pl','
',0,'2014-09-30T18:14:07','2014-09-30T18:14:07','admin','admin','.YEntit
yServlet','.YEntityServlet' ) "/>
<Attribute Name="DBErrorCode" Value="1"/>
<Stack>
Look at the below sequel where 'DEFAULT', 'pl' is coming for YFS_UOM. (Which is already present as a result of first call). Due to ORGANIZATION_CODE, UOM as unique key for YFS_UOM you are not able to insert the records.
INSERT /*YANTRA*/ INTO YFS_UOM(UOM_KEY,ORGANIZATION_CODE,UOM_TYPE,UOM,UOM_DESCRIPTION,VOLUME_UO
M,LOCKID,CREATETS,MODIFYTS,CREATEUSERID,MODIFYUSERID,CREATEPROGID,MODIFY
PROGID) values ( '2014093018140734103','DEFAULT','WEIGHT','pl','pl','
',0,'2014-09-30T18:14:07','2014-09-30T18:14:07','admin','admin','.YEntit
yServlet','.YEntityServlet' )
Create a UOM with some other name. Current Product Design would not allow to create two UOM's with same name under same organization.
How to create a unit of measure for weight?
- Open the Applications Manager and select the application that you want.
- From the tree in the application rules side panel, choose Unit of Measure > Weight. The Weight UOMs window displays in the work area.
- The Weight UOMs window displays in the work area. Choose the Create New icon. The Unit of Measure Details window displays.
- In UOM Code, enter the unit of measure.
- UOM Description, enter a brief description of the unit of measure.
- Choose the Save icon.
Unit of measure for quantity can be done in similar way.
Cause
Product has the Unique Key as ORGANIZATION_CODE, UOM (INDEX_NAME= YFS_UOM_I1) for YFS_UOM table.
Diagnosing The Problem
Here is the stack trace when you try to create multiple UOMs with same name in different UOMType groups.
<Error ErrorCode="YFC0001"
ErrorDescription="Record already exists in the database."
ErrorRelatedMoreInfo="">
<Attribute Name="ErrorCode" Value="YFC0001"/>
<Attribute Name="ErrorDescription" Value="Record already exists
in the database."/>
<Attribute Name="SQLState" Value="23000"/>
<Attribute Name="TransactionIsolationLevel" Value="2"/>
<Attribute Name="Method" Value=""/>
<Attribute Name="SQLStatement" Value="PREPARED STATEMENT -
INSERT /*YANTRA*/ INTO
YFS_UOM(UOM_KEY,ORGANIZATION_CODE,UOM_TYPE,UOM,UOM_DESCRIPTION,VOLUME_UO
M,LOCKID,CREATETS,MODIFYTS,CREATEUSERID,MODIFYUSERID,CREATEPROGID,MODIFY
PROGID) values ( '2014093018140734103','DEFAULT','WEIGHT','pl','pl','
',0,'2014-09-30T18:14:07','2014-09-30T18:14:07','admin','admin','.YEntit
yServlet','.YEntityServlet' ) "/>
<Attribute Name="DBErrorCode" Value="1"/>
<Stack>
<Stack>com.yantra.yfc.util.YFCException
at com.yantra.app.config.YantraConfigMain.
initInitializers(YantraConfigMain.java:1118)
at com.yantra.app.config.YantraConfigApplet.showMenu
(YantraConfigApplet.java:166)
at com.yantra.app.config.YantraConfigApplet.init
(YantraConfigApplet.java:81)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.
init(Unknown Source)
at sun.plugin2.applet.
Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
</Stack>
</Error>
</Errors>
Resolving The Problem
The problem occurs due to ORGANIZATION_CODE, UOM as unique key (INDEX_NAME= YFS_UOM_I1) for YFS_UOM. Pass UOM as a unique name.
Related Information
Was this topic helpful?
Document Information
Modified date:
11 February 2020
UID
swg21687028