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

Rest Connector - Accounts import is failing groovy.lang.MissingMethodException

midhunj
New Contributor
New Contributor

We are working on a rest connector for integration between cornerstone and we are seeing the following error when we add the pagination to the importacctentjson, when we remove the pagination we are seeing default page size accounts are imported successfully.

 

Below is the error when we add the pagination to the JSON,

 

"2024-07-11T16:28:56.683+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-16-79bth","DEBUG","Inside importAccountsFull:persistAccounts, pptTypeSep : ~#~"
"2024-07-11T16:28:56.683+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-16-79bth","ERROR","Exception in persistAccounts:"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth","","groovy.lang.MissingMethodException: No signature of method: java.util.LinkedHashMap.split() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [~#~, -1]"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth","","Possible solutions: split(groovy.lang.Closure), wait(), sort(), wait(long, int), sprintf(java.lang.String, java.lang.Object), sprintf(java.lang.String, [Ljava.lang.Object;)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.persistAccounts(RestProvisioningService.groovy:4958)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService$_processAccounts_closure28_closure107.doCall(RestProvisioningService.groovy:4185)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService$_processAccounts_closure28.doCall(RestProvisioningService.groovy:4183)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.processAccounts(RestProvisioningService.groovy:4182)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.processAccountsFinal(RestProvisioningService.groovy:1681)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.processAccountsFullBySequentialAndIterative(RestProvisioningService.groovy:1645)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.importAccountsFull(RestProvisioningService.groovy:1473)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.doImport(RestProvisioningService.groovy:138)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.ecm.integration.ExternalConnectionCallService.invokeExternalMethod(ExternalConnectionCallService.groovy:232)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at ApplicationDataImportJob.execute(ApplicationDataImportJob.groovy:211)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at org.quartz.core.JobRunShell.run(JobRunShell.java:199)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)"
"2024-07-11T16:28:56.684+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-16-79bth","ERROR","Invalid record not processed : [id:-7, externalId:bsuser, userName:CSODBSAdmin, guid:e257f820-5a80-45cd-bf77-421d0bfedd68, firstName:CSOD, lastName:Business System User, middleName:null, prefix:null, suffix:null, primaryEmail:null, personalEmail:null, homePhone:null, mobilePhone:null, workPhone:null, fax:null, address:[country:USA, line1:null, line2:null, city:null, state:null, zipCode:null], workerStatus:[lastHireDate:null, originalHireDate:null, active:true, absent:false], settings:[displayLanguage:en-US, timeZone:(UTC-08:00) Pacific Time (US & Canada), trainingApprovals:0], managerId:null, approverId:0, employeeMetaData:[createdDate:2016-12-03T05:25:48.607, modifiedDate:null]]"
"2024-07-11T16:28:56.684+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-16-79bth","ERROR","Exception in persistAccounts:"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth","","groovy.lang.MissingMethodException: No signature of method: java.util.LinkedHashMap.split() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [~#~, -1]"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth","","Possible solutions: split(groovy.lang.Closure), wait(), sort(), wait(long, int), sprintf(java.lang.String, java.lang.Object), sprintf(java.lang.String, [Ljava.lang.Object;)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.persistAccounts(RestProvisioningService.groovy:4958)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService$_processAccounts_closure28_closure107.doCall(RestProvisioningService.groovy:4185)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService$_processAccounts_closure28.doCall(RestProvisioningService.groovy:4183)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.processAccounts(RestProvisioningService.groovy:4182)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.processAccountsFinal(RestProvisioningService.groovy:1681)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.processAccountsFullBySequentialAndIterative(RestProvisioningService.groovy:1645)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.importAccountsFull(RestProvisioningService.groovy:1473)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.doImport(RestProvisioningService.groovy:138)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.ecm.integration.ExternalConnectionCallService.invokeExternalMethod(ExternalConnectionCallService.groovy:232)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at ApplicationDataImportJob.execute(ApplicationDataImportJob.groovy:211)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at org.quartz.core.JobRunShell.run(JobRunShell.java:199)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)"
"2024-07-11T16:28:56.684+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-16-79bth","ERROR","Invalid record not processed : [id:1, externalId:cesadmin, userName:cesadmin, guid:2eca8706-e070-4bfd-b8be-0972234354ab, firstName:Cornerstone, lastName:Admin, middleName:null, prefix:null, suffix:null, primaryEmail:clientservices@cyberu.com, personalEmail:null, homePhone:null, mobilePhone:null, workPhone:null, fax:null, address:[country:null, line1:null, line2:null, city:null, state:null, zipCode:null], workerStatus:[lastHireDate:null, originalHireDate:null, active:true, absent:false], settings:[displayLanguage:en-US, timeZone:(UTC-05:00) Eastern Time (US & Canada), trainingApprovals:0], managerId:null, approverId:null, employeeMetaData:[createdDate:2005-08-10T16:56:59.81, modifiedDate:2023-11-21T10:32:30.213]]"
"2024-07-11T16:28:56.685+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-16-79bth","ERROR","Exception in persistAccounts:"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth","","groovy.lang.MissingMethodException: No signature of method: java.util.LinkedHashMap.split() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [~#~, -1]"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth","","Possible solutions: split(groovy.lang.Closure), wait(), sort(), wait(long, int), sprintf(java.lang.String, java.lang.Object), sprintf(java.lang.String, [Ljava.lang.Object;)"
"2024-07-11T16:28:57.083+00:00","ecm-worker","","null-79bth",""," at com.saviynt.provisoning.rest.RestProvisioningService.persistAccounts(RestProvisioningService.groovy:4958)"

 

Following the importacctjson we are using,

{
"accountParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url":"https://cn360-pilot.csod.com/services/api/x/users/v2/employees/",
"httpHeaders":{
"Authorization":"${access_token}"
},
"httpContentType":"application/json",
"httpMethod":"GET"
},
"listField":"data",
"keyField":"accountID",
"statusConfig":{
"active":"true",
"inactive":"false"
},
"colsToPropsMap":{
"accountID":"userName~#~char",
"name":"userName~#~char",
"displayName":"userName~#~char",
"customproperty1":"id~#~char",
"customproperty2":"externalId~#~char",
"customproperty3":"guid~#~char",
"customproperty4":"firstName~#~char",
"customproperty5":"lastName~#~emchar",
"status":"workerStatus.active~#~char",
"customproperty10":"managerId~#~char",
"customproperty6":"middleName~#~char",
"customproperty7":"primaryEmail~#~char",
"customproperty8":"workPhone~#~char",
"customproperty9":"mobilePhone~#~char",
"customproperty11":"settings.displayLanguage~#~char",
"customproperty12":"approverId~#~emchar",
"pagination":{
"nextUrl":{
"nextUrlPath":"${response?.completeResponseMap.containsKey('nextpagetoken')?'https://cn360-pilot.csod.com/services/api/x/users/v2/employees?nextPageToken='+response?.completeRes...: null}"
}
}
}
}
}
}
}

 

The pagination logic is similar to the logic provided by the saviynt for cornerstone integration.

Attached are the logs for the same.

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

midhunj
New Contributor
New Contributor

1. Attached are the screenshots,

midhunj_0-1721048523446.png

2. Get Employees data - 1st page.

midhunj_1-1721048624201.png

 

3. Get employees data using nextpage token from the previous page,

midhunj_2-1721048718553.png

 

Does it import data and fails or it does not brings any data from second page onwards 


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

It doesn’t bring any data even from first page when I use pagination.  However, when I remove pagination logic, it brings first page data.