unique constraint PK_BIZDOCREL_DOCID_RELATDOCID violated

Hi,

When I try to submit the EDI PO’s I got this error

Could not insert the new document.
(0) java.sql.SQLIntegrityConstraintViolationException: [sag-cjdbc42-0011][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (WM_V82.PK_BIZDOCREL_DOCID_RELATDOCID) violated

(1) java.sql.SQLIntegrityConstraintViolationException: [sag-cjdbc42-0011][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (WM_V82.PK_BIZDOCREL_DOCID_RELATDOCID) violated

But when I removed the 2nd ST segment and tried submitting it went fine (i.e if I process one by one its going fine) If I submit with two ST segments I’m getting the above error.

It looks like PrimaryKey violation. Not sure on which table this error it’s getting thrown. Actually I copied the first ST/SE segment for the 2nd time in the same GS/GE segment (had unique PO# (BAK03 segment) ). One more thing, I’m submitting the EDI PO from IS Admin page : http://localhost:5555/invoke/wm.tn/receive

What could have went wrong? Your views.

Regards,
Sam

sam,

Reason for this error is because of attribute value you are passing into TN is not supported as per TN tables.

ex: it may be expecting a different value, but you are not pushing same type to TN Database

Thanks
Sai

Sam,
Can you plz display the data which you are sending as part of EDI so that we can figure out the where the issue persists.

Please post your EDI 850 data here and we can take a look on the root cause:

Hi,

I have attached the data.

Copy of EDI2POS.txt (1.08 KB)

I don’t see any issues with your EDI file having with 2 ST’s and ISA/GS/GE and counts look ok to me…It’s weird:

Where do you see the error in the error log or Activity log and what status you see in the TN transaction analysis does the 2 X12 4010 850 splits showing up?

HTH,
RMG

This constraint is on the BIZDOCRELATIONSHIP table

Please check the data in that table and see if you can some clue about what is happening…

Also if you have recently migrated the TN DB to new 822 there are some table constraint related issues can occur and so you need to take help from your DBA and resolve it.

HTH,
RMG

Hi RMG,

I’m trying to submit through WmEDIForTN IS page, I’m seeing error here. All these I’m trying in my local machine. But when I do the same in our office DEV environment I’m not seeing the error. Is there something wrong with the DB setup?

Hi Sreenivas, yes I can see this column “RELATDOCID” in this table:BIZDOCRELATIONSHIP. Thanks for all your helping me.

Regards,
Sam.

Yes could be wrong with the DB tables itself…so please verify DEV vs issue one and get hold of your DBA while troubleshooting I would say:

HTH,
RMG

Hi RMG,

DB in my local machine was working. Suddenly when I started seeing this error, I couldn’t do any transaction now :frowning:
Hope I have to clear the table or recreate the TN tables.

Regards,
Sam

Yes you may try that route first drop all the TN PRODUCT tables and then re-create it on the TN product and make sure you have given all the constraints/privileges given.

HTH,
RMG

[sag-cjdbc42-0011][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (WM82_IS_USER.TRIGSTATE_PKX) violated.

Got the below error in our server logs. As per the above conversation this exception would occur in case if i use TN component. But we are not using TN. Could anyone comment on the same?

Hi Lance,

the mentioned constraint is not part of the TN database section.

This is the index for the PrimaryKey of the table IS_TRIGGER_STATE(Field TRIGGER_ID).

This means that the IS tries to insert the same TRIGGER_ID multiple times into the Database.

Can you elaborate on this?

Regards,
Holger

Lance – I agree with Holger.

Can you tell us in which situation did you encounter this error to better understand the situation.

Thanks,