SAP Knowledge Base Article - Public

2263430 - Payment Information - PaymentMethodAssignmentV3.getCountry NullPointerException

Symptom

Encounter the following error when trying to Save data to the "Payment Information" portlet via the Personal Information page -:

PaymentMethod_NPE.png

Error message reads -:

Remote Exception: RuntimeException; nested exception is: com.successfactors.sca.ServiceSystemException: Remote Exception: while trying to invoke the method com.successfactors.genericobject.bean.businessobjects.Country.getCode() of a null object returned from com.successfactors.workstructure.bean.core.model.PaymentMethodAssignmentV3.getCountry(); nested exception is: java.lang.NullPointerException: while trying to invoke the method com.successfactors.genericobject.bean.businessobjects.Country.getCode() of a null object returned from com.successfactors.workstructure.bean.core.model.PaymentMethodAssignmentV3.getCountry()

Environment

Employee Central 2.0

Reproducing the Issue

The issue can be reproduced depending on configuration of the Payment Method object association with the Country object (if the association Required status is set to NO).

Cause

One or more Payment Methods exist in the system without a Country associated (Payment Method Assignment). Hence the NullPointException (when trying to getCountry, NULL is returned because one or more Payment Methods have no Payment Method Assignment (Country) value set in the associated section "Payment Method Assignment" of the Payment Method data object

Resolution

Step 1 - Data Correction

  1. Navigate to Admin Center > Manage Data
  2. In the first search box, choose "Payment Method"
  3. In the second seach box, click the drop-down arrow and select the first Payment Method in the list
  4. Verify that a Country has been defined in the Payment Method Assignment section
  5. If no Country is specified, please use Take Action > Make Correction and specify a Country and then save
  6. Proceed to check every Payment Method and verify they all have a Country set

PaymentMethod.JPG

Step 2 - Configurtion Correction

  1. Navigate to Admin Center > Configure Object Definition
  2. In the first search box, choose "Object Definition"
  3. In the second seach box, choose "Payment Method"
  4. Click Take Action > Make Correction and scroll down to the Association section
  5. Click "Details" next to the "Payment Method Assignment" association
  6. Set the "Required" field to "Yes". Then click "Done" and then "Save"

PaymentMethod_Assignment_Req.JPG

 

Now when trying to create or update a Payment Method without a Payment Method Assignment (Country) specified, the following error will be displayed -:

 

error_PMA.JPG

See Also

JIRA PAY-1449

Keywords

Payment Information PaymentMethodAssignmentV3.getCountry NullPointerException PAY-1449 Payment Method Payment Method Assignment , KBA , LOD-SF-EC-LOC , Localization & Country Specifics , LOD-SF-EC-MDF , MDF & EC2MDF Migration , Problem

Product

SAP SuccessFactors HCM Core all versions