000031709 - Error: String Index out of range: -1  when collecting in VIA L&G

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000031709
Applies ToRSA Product Set: Identity Management and Governance
RSA Product/Service Type: Enterprise Software
RSA Version/Condition: 6.9.1
Platform: JBoss
Platform (Other): null
O/S Version: null
Product Name: RSA-0018000
Product Description: Access Certification Manager
IssueWhen running a collector, get an error message :
Error:  Caused by java.sql.SQLException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 
It is also possible to get this error when trying to insert null data into a string .
CauseThis is caused when a field requires string data, but there is none in the input field.   It has also been seen when an input field does include string data, but a filter or query on the field returns null data. 
ResolutionFix the input data to not contain null data.   If there is some kind of filter or query, verify that this will not return null data with the input data. 
NotesAn example is when a field user.user_name should be an email address or UPN  (user@domain), but a query included a filter to collect/extract accounts, such as :  
SELECT Distinct * FROM (Select SUBSTR(user.user_name, 1, INSTR(user.user_name, '@')-1) AS Account  FROM App_Roles)
and one of the input rows did not have an email address (specifically missing the "@" character) .
 This portion of the filter:
INSTR(user.user_name, '@')-1)
 does not find an "@" , so it returns null data.