Account import failing with "java.lang.ArrayIndexOutOfBoundsException: 1"

AmitM
New Contributor III
New Contributor III

Hi All,

One of our account import job is failing with below error:

rest.RestProvisioningService - Exception in persistAccounts try2 :"
"ecm-worker","2023-08-02T19:33:03.607+0000","2023-08-02T19:33:02.714785772Z stdout F java.lang.ArrayIndexOutOfBoundsException: 1"

Saviynt is able to fetch accounts from target and find out the object size:

Target response: 

{"Identities":[{"FullName":"\\VED\\Identity\\tssadmin","Name":"tssadmin","Prefix":"local","PrefixedName":"local:tssadmin","PrefixedUniversal":"local:{2dbf7c65-3464-4sa44-9431-f67sabc2528f9}","Type":1,"Universal":"{2dbf7c65-3464-4ss4-9431-f675bc2528f9}"},{"FullName":"\\VED\\Identity\\tssadminbackup","Name":"tppadminbackup","Prefix":"local","PrefixedName":"local:tssadminbackup","PrefixedUniversal":"local:{6d79ess9-c03f-4105-b8c9-1a787ecb92c8}","Type":1,"Universal":"{6d79ed89-c03f-4105-b8c9-1a787ecb92c8}"}]}

rest.RestProvisioningService - pullObjectsByRest - responseMap.size : 1"
"ecm-worker","2023-08-02T19:33:03.607+0000","2023-08-02T19:33:02.708164753Z stdout F 2023-08-02 19:33:02,708 [quartzScheduler_Worker-8] DEBUG rest.RestProvisioningService - pullObjectsByRest - objectList.size : 2"

But then it fails with above error. Is it because of characters like \\ and {} in attribute values

Anybody faced this/similar issue before

 

Account Import JSON is like this:

"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://abc.com/vedsdk/identity/browse",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "POST",
"httpParams": "{\"IdentityType\": 1}"
},
"listField": "Identities",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "PrefixedUniversal~#~char",
"name": "Name~#~char",
"displayName": "FullName~#~char",
"customproperty1": "Universal~#~char"
},
"disableDeletedAccounts": true
}
}
}

6 REPLIES 6

sahil
Saviynt Employee
Saviynt Employee

Can you remove the Fullname mapping from colsToPropsMap section to see if the issue is caused due to // or something else.


Regards,
Sahil

AmitM
New Contributor III
New Contributor III

We are not getting the issue(Job failure) now. It is not caused by // , though Saviynt converts // into / while storing it in accounts table.

Is there a way we can save it in accounts table as-is. with two backslash.

sahil
Saviynt Employee
Saviynt Employee

You can try the replace function in order to escape the \\ and see if it helps.

.replace('\\', '\\\\')


Regards,
Sahil

AmitM
New Contributor III
New Contributor III

.replace('\\\\','\\\\\\\\') . This worked. 

sahil
Saviynt Employee
Saviynt Employee

Can you please also add your complete JSON you are using now so the others can also benefit from it if they face the same issue.


Regards,
Sahil

AmitM
New Contributor III
New Contributor III

"displayName": "#CONST#${String fname = response.FullName; fname=fname.replace('\\\\','\\\\\\\\')}~#~char"

This is the relevant change. Rest JSON is at top.