Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Update account task failing with Null pointer exception

aibasu
New Contributor III
New Contributor III

Hi ,

I am trying to push update account task for a customized REST endpoint . Although the new account task is working , the update account task is repeatedly failing with the following error message : 

2023-08-07/17:16:12.297 [{}] [quartzScheduler_Worker-4] DEBUG services.SaviyntCommonUtilityService - Sql = Select epattr from Endpoint_attributes epattr where epattr.endpoints.id = :epid and epattr.requestType=1 and epattr.defaultvalue is not null and epattr.defaultvalue <> ''
2023-08-07/17:16:12.300 [{}] [quartzScheduler_Worker-4] DEBUG services.SaviyntCommonUtilityService - Endpoint Attrs = []
2023-08-07/17:16:12.300 [{}] [quartzScheduler_Worker-4] ERROR rest.RestProvisioningService - Error in processWebservicejava.lang.NullPointerException: Cannot invoke method size() on null object

Can anyone please help me with how to resolve this ?

Thanks !

6 REPLIES 6

smitg
Regular Contributor III
Regular Contributor III

Hi @aibasu ,

Can you share the update account JSON

Thanks,
Smitha

aibasu
New Contributor III
New Contributor III

Hi Smitha ,

Yes please find it below :-

{
"actions": {
"Update Login": {
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "*application url*",
"httpMethod": "PUT",
"httpParams": "{\"location\": \"${user.city}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
}
]
}
}
}

Vedanth_BK
Saviynt Employee
Saviynt Employee

Hi @aibasu ,

The format of the above JSON is used for UpdateUserJSON. Since this is an update account use case,Please use the below  JSON.

{
  "dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
  "responseColsToPropsMap": {},
  "call": [
    {
      "name": "call1",
      "connection": "acctAuth",
      "url": "",
      "httpMethod": "PUT",
      "httpParams": "{\"location\": \"${user.city}\"}",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Accept": "application/json"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          200,
          201
        ]
      }
    }
  ]
}

Thank you 

Vedanth B.K

aibasu
New Contributor III
New Contributor III

Hi Vedanth , 

I have tried this updateaccountjson but still I am getting the same error :

2023-08-09/08:51:46.995 [{}] [quartzScheduler_Worker-7] DEBUG services.SaviyntCommonUtilityService - Sql = Select epattr from Endpoint_attributes epattr where epattr.endpoints.id = :epid and epattr.requestType=1 and epattr.defaultvalue is not null and epattr.defaultvalue <> ''
2023-08-09/08:51:46.997 [{}] [quartzScheduler_Worker-7] DEBUG services.SaviyntCommonUtilityService - Endpoint Attrs = []
2023-08-09/08:51:46.997 [{}] [quartzScheduler_Worker-7] ERROR rest.RestProvisioningService - Error in processWebservicejava.lang.NullPointerException: Cannot invoke method size() on null object

Could you please help with this ?

Thanks !

Vedanth_BK
Saviynt Employee
Saviynt Employee

@aibasu Please let me know where have you added this JSON in the connection page.

aibasu
New Contributor III
New Contributor III

Hi Vedanth , 

I have added the JSON in UPDATEACCOUNTJSON section . 

Thanks !