SAP Knowledge Base Article - Public

3556986 - Error: Cannot invoke 'com.plateausystems.elms.client.javabean.StudentJB.getCurrentStudentID()' due to null 'studentJB' is null

Symptom

  • When performing GET calls with criteria such as "criteria/includeDeepLink eq true," the following error may occur: "Cannot invoke 'com.plateausystems.elms.client.javabean.StudentJB.getCurrentStudentID()' because 'studentJB' is null."
  • Alternatively, the error "You don't have permission to view this data" may be displayed.

Environment

  • SAP SuccessFactors Learning
  • Web Services OData

Reproducing the Issue

  1. Generate the admin token from LMS server or BizX SAML token. 
  2. Perform GET API Call: https://learning.plateau.com/learning/odatav4/public/user/learningPlan/v1/UserTodoLearningItems?$filter=criteria/targetUserID eq 'USERID' and criteria/includeDeeplink eq true  (OR) https://learning.plateau.com/learning/odatav4/public/user/learningPlan/v1/UserTodoLearningItems?actingAs=admin&$filter=criteria/targetUserID eq 'USERID' and criteria/includeDeeplink eq true. 
  3. Observe the error: "Cannot invoke 'com.plateausystems.elms.client.javabean.StudentJB.getCurrentStudentID()' because 'studentJB' is null" or "You don't have permission to view this data." 

Cause

This behavior is expected when using the admin token. 

Resolution

This API is specifically designed for user-related operations, and is not intended for use with an admin persona. 

  •  Ensure to use a user type token ("userType":"user") when using the LMS server token for this call.
  •  If using BizX SAML token, ensure to generate token for the same user whose assigned items you want to retrieve, and use the same token to call the API.

See Also

Keywords

error message, null pointer, API call failure, user token, admin token, LMS server, assigned items, OData API, SAP SuccessFactors Learning, criteria filter, includeDeepLink, user operations, admin persona, token validation, troubleshooting, API error  , KBA , LOD-SF-LMS-ODA , Web Services OData , Problem

Product

SAP SuccessFactors Learning all versions