Support Article
Save failed when trying to enter duplicate data records
SA-17233
Summary
User could not install CSSample.jar into Industry insurance framework (IIF) installed system.
Error Messages
Save Failed : Batch entry 0 INSERT INTO pegadata.pa_address_type
Steps to Reproduce
The order of installation is as follows:
1. IIF716_install_Bundle.jar
2. IIF716_SampeData.jar
3. CustomerService_714.jar
4. CSSample.jar
Observe that there is an error while installing CS Sample jar and the import failed.
Root Cause
There are two classes in the system 'PEGACA-INTERFACE-ADDRESSTYPE' and 'PEGAAPP-INTERFACE-ADDRESSTYPE'.
Both of them has same six records to be inserted to database. The table is pa_address_type which has these columns ADDRESSTYPE, ADDRESSTYPEDESCRIPTION , CATEGORY where ADDRESSTYPE is primary (No class information present over there).
When importing IIF jar, 'PEGAAPP-INTERFACE-ADDRESSTYPE' class, 'PEGAAPP-INTERFACE-ADDRESSTYPE' D-A-D-T and six addresstype records got created in the db. While importing customerservice jar only 'PEGACA-INTERFACE-ADDRESSTYPE' class got imported without D-A-D-T. So, it got mapped to pr_other.
The second one, while importing CSSample.jar the system synchronized on six records 'PEGACA-INTERFACE-ADDRESSTYPE' instances and found that no records are present in pr_other, so marked them as insert. But in the same package DADT for 'PEGACA-INTERFACE-ADDRESSTYPE' was included, it got imported before instances which changed the mapping and insert started firing to pa_address_type.
Thus the error is coming as the record that was already there in the pa_address_type table (which came from IIF installation). To rectify the above error, one can divide the CSSample.jar into two. Pega is already providing the splitted jars to multi tenant applications in the media.
Resolution
Import the 'CASample_DDL' and 'CASample_DML' jars seperately, instead of importing CSSample.jar, to resolve the issue.
Published January 31, 2016 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.