Getting String index out of range: -1 error when passing flat file data to data process step/map step

Document created by Pavan_Sirasanambedu Employee on Apr 23, 2015Last modified by vreddy on Mar 1, 2016
Version 2Show Document
  • View in full screen mode
String index out of range: -1 error when passing flat file data to data process step/map step.
If you observe the String index out of range: -1 error when passing flat file data to data process step/map step then verify the flat file data and there you will see additional line spacing in between. Because of this line spacing, we will get this error. Please remove the line space before sending to map or data process step.

 

Sample Line Spacing  Flat file:
0, fine, end
1, sample column which has line space

 

because of this record, end
2, fine, end
3, fine, end

 

Possible solutions:
1) Remove line spacing from the file using notepad++ for windows.
    An alternative for notepad++ that works for Mac's. The app is called "TextWrangler" and it's a free download. Here is the link
    where I found this. http://tamanmohamed.blogspot.com/2012/11/mac-alternatives-to-notepad-on-mac-os-x.html
2) Restrict line spacing from your source system
3) In Boomi - there is no direct way to remove this spacing, you may need to custom scripting to remove the extra line spacing.

Attachments

    Outcomes