SAP Knowledge Base Article - Public

3396635 - Duplicate key error when uploading onboarding document template - Onboarding

Symptom

  • See error when uploading onboarding document template.
  • Error Message: ChangeSet index 1 - ???org.json.JSONException: Duplicate key "xxx" at xxx [character xxx line 1]???

Environment

SAP SuccessFactors Onboarding

Reproducing the Issue

  1. Go to Admin Center >> Maintain Onboarding and Offboarding Document Templates
  2. Click on Add New Document Template
  3. Add the document >> click on Upload
  4. See error: ChangeSet index 1 - ???org.json.JSONException: Duplicate key "xxx" at xxx [character xxx line 1]???

Cause

There is a "." (dot) in the Field Name.

When using "." (dot) in the Field Name, PDF form fields will be grouped by the "." (dot) naming convention (group naming convention). 

The text before the "." (dot) will be identified as the group name. The text after the "." (dot) will be identified as the key for the field.

If the PDF has fields with Field Names such as "1.Yes", "2.Yes", "3.Yes", the duplicate key error will occur because it'll be read as Group "1", "2", "3" all have the same key "Yes".

Resolution

  1. Remove "." (dot) from the Field Name:
    e.g. Modifying the Field Name to "1Yes", "2Yes", "3Yes", etc.
  2. In case group naming is necessary, please make sure the key after "." (dot) is not duplicated:
    e.g. Modifying the Field Name to "1.Yes1", "2.Yes2", "3.Yes3", etc.

Keywords

Onboarding document template, placeholder, ChangeSet index 1, org.json.JSONException, duplicate key, character, line 1 , KBA , LOD-SF-OBX-DOC , Generation of Documents using PFS , Problem

Product

SAP SuccessFactors Onboarding all versions