SAP Knowledge Base Article - Public

3741598 - Placeholder mappings are not visible/"mappingInstance" is null - Onboarding

Symptom

  • The placeholders are not visible when accessing the template via Admin Center > Manage Document Template Mapping.
  • An error occurs when uploading a document template via Admin Center > Maintain Onboarding and Offboarding Document Templates:
    Error:
    ChangeSet index 1 - Cannot invoke "com.successfactors.documentgeneration.app.DocumentGenerationTemplate.setBody(String)" because "mappingInstance" is null

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

SAP SuccessFactors Onboarding

Reproducing the Issue

  1. Navigate to Admin Center > Maintain Onboarding and Offboarding Document Templates
  2. Select an existing document template and open its mapping.
  3. Observe that placeholders are not visible when accessing the template via Admin Center > Manage Document Template Mapping.
  4. Attempt to upload or update the document template.
  5. Error:
    ChangeSet index 1 - Cannot invoke "com.successfactors.documentgeneration.app.DocumentGenerationTemplate.setBody(String)" because "mappingInstance" is null

Cause

  • The Object Definition: Document Generation Template (DocumentGenerationTemplate) is configured with Secured = Yes, which restricts access to the underlying mapping instance.
  • As a result, the system is unable to retrieve the required object during template processing, leading to a null mappingInstance and triggering the error.

Resolution

  1. Navigate to Admin Center > Configure Object Definitions.
  2. Search:
    Object Definition: Document Generation Template (DocumentGenerationTemplate)
  3. Click on Take Action > Make Correction
  4. Under Security, set Secured to "No".
  5. Save

After updating the configuration, retry accessing the Document Template Mapping and uploading the document template. The placeholders should now be visible, and the error should no longer occur.

Keywords

onboarding, obx, ONB2FormTemplate, ChangeSet index 1, DocumentGenerationTemplate, mappingInstance is null, NullPointerException, ONB2 Document Template, Document Template Mapping, Onboarding Document Template upload error, Manage Document Template Mapping, Maintain Onboarding and Offboarding Document Templates, placeholder not visible , KBA , LOD-SF-OBX-DOC , Generation of Documents using PFS , Problem

Product

SAP SuccessFactors Onboarding all versions

Attachments

object_definition - secured.png