Symptom
- Application error when mapping competency to role in JPB.
- JDM to JPB runtime exception: "java.lang.NullPointerException"
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 Job Profile Builder
Reproducing the Issue
When manually mapping competency to role in "Manage Job Profile Content", or via import role competency mappings, application error occurs and can not be saved.
Note
When checking the error log of the application error or the error log in import job, it shows NullPointerException:
Cannot invoke "com.successfactors.capabilitymanagement.bean.competency.CompetencyEntity.getInternalId()" because the return value of "com.successfactors.jdmng.bean.RoleCompetencyMappingEntity.getCompetency()" is null
OR
When JDM to JPB migration is run, it fails with runtime exception: java.lang.NullPointerException: Cannot invoke "com.successfactors.capabilitymanagement.bean.<generic Object>.getId()" because the return value of "com.successfactors.jdmng.bean.<Generic Object>.<generic Object>.getEntity()" is null
Cause
Some Competencies/Skills had been deleted, before their mapping to the role/family/job profile is delimited.
Thus, when editing the role/family/job profile further, the system will check all the mappings (even the competency is deleted) and when the system can not find the competencies, it throws null pointer error.
Note
How to check:
1. Check via "manage data"
Go to Admin Tools > Manage Data > Select the affected entity for first dropdown list > Fill the name in the second column > Check "Mapped Competencies" section > Find if any Competency/Skill with empty “Competency GUID” exists.
2. Check Role-Mapped Competencies file via export
Go to Manage Job Profile Contents Import/Export > download "Role-Mapped Competencies" and check in the file > filter for the role > Check if any blank value exists in column "Competency.External Code" exists for the role.
Resolution
Delete the Role/Family/Job Profile with error and create a new one. Please note that before deleting, use the "Manage Job Profile Contents Import/Export" tool to export the role related mapping files and confirm the role has no mapping to job code, competency, family, job profile etc.
If the role is not mapped to other entities, then you can delete the role. If the role is mapped to other entities, delimit those mappings first before deleting the entity to avoid the null pointer error.
Note
- When creating JPB data, create the entities e.g. competency, role, family first, then map them.
- When deleting JPB data, delimit the mapping first manually in JPB or via import (for example 2718919 - Delimit Competency Mapping from Job Role Via Import), then delete the entity.
See Also
References:
Keywords
NullPointerException, application error, add competency to role, map competency, competency, role, entity, JPB data, JPB, job profile builder, getCompetency()" is null, RoleCompetencyMappingEntity, sfsf, java.lang.NullPointerException, Cannot invoke, because the return value is null , KBA , LOD-SF-TIH-JPB , Job Profile Builder , Problem
Product
Attachments
| Pasted image.png |
| Pasted image.png |
| Pasted image.png |
| Pasted image.png |
SAP Knowledge Base Article - Public