SAP Knowledge Base Article - Public

2321721 - ODATA API: JobRequisition entity returns COE_GENERAL_SERVER_FAILURE/ Failed to retrieve result with given criteria.

Symptom

  • Query on JobRequisition Odata entity doesn’t return any data but returns the below error.

1..jpg

 

Environment

  • Successfactors BIZX
  • Recruitment Management
  • API portal

Reproducing the Issue

  • Execute the following API Query /odata/v2/JobRequisition
  • This would return the below response
  • <?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>COE_GENERAL_SERVER_FAILURE</code>
    <message lang="en-US">Failed to retrieve result with given criteria.</message></error>


Cause

  • The JobRequisition XML templates do not have the defaultLanguage
  • And there is no NULL check in the code as well to handle this type of API request.

Resolution

Please perform the following to resolve this error. 

1) Update all the JobRequisition templates in provisioning with the defaultLanguage. Including inactive ones
2) Refresh the Odata API metadata cache after updating the jobreq template.

Please follow the KBA 2171588 which explains how to refresh the Odata API metadata

An example xml of the defaultLanguage is shown below:
<field-definition id="defaultLanguage" type="text" required="false" custom="false">
<field-label><![CDATA[Default Language]]></field-label>
<field-label lang="en_US"><![CDATA[Default Language]]></field-label>
<field-description><![CDATA[Default Language]]></field-description>
</field-definition>

Keywords

JobRequisition API Odata Query error defaultLanguageProp of a null object loaded from local variable 'defaultLanguageProp' <?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>COE_GENERAL_SERVER_FAILURE</code>

<message lang="en-US">Failed to retrieve result with given criteria.</message></error> or <?xml version="1.0" encoding="utf-8"?> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <code>ServerErrorException</code> <message lang="en-US">while trying to invoke the method com.successfactors.coengine.provider.j2.me
, KBA , LOD-SF-INT , SF Integrations - EC Payroll, Boomi/ HCI, API , LOD-SF-INT-API , SF API & Adhoc API Framework , Problem

Product

SAP SuccessFactors HCM Core 1605