Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

CSV with carriage return in fields fails Decision Data Import



In Decision Data Import Wizard, user found an issue while importing the Comma-Separated-Values (CSV) with Decision Data in Pega 7.1.8, which causes the Import wizard screen of Decision Data freeze but no error on the UI. User can see RuntimeException and StringIndexOutOfBoundsException in the log file.

Error Messages

2015-10-14 14:11:27,267 [tp-bio-8443-exec-107] [TABTHREAD1] [ ] [ RBSNBAMP1:01.01.01] ( internal.mgmt.Executable) ERROR abc- Exception
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(
at com.pegarules.generated.activity.ra_action_pxuploadcsvresults_d6880d98e7f5bcf7025dc7520c94f205.step7_circum0(
at com.pegarules.generated.activity.ra_action_pxuploadcsvresults_d6880d98e7f5bcf7025dc7520c94f205.perform(
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(
at com.pegarules.generated.activity.ra_action_pzinitializeanduploadcsv_d15ed356d5b5dd20432637606b830775.step2_circum0(
at com.pegarules.generated.activity.ra_action_pzinitializeanduploadcsv_d15ed356d5b5dd20432637606b830775.perform(
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(
at com.pegarules.generated.activity.ra_action_pzrunactionwrapper_056ec03796d8a13802f156886066036d.step1_circum0(
at com.pegarules.generated.activity.ra_action_pzrunactionwrapper_056ec03796d8a13802f156886066036d.perform(
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(

at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.AbstractHttp11Processor.process(
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

Steps to Reproduce

There was a hidden carriage return character in a text string in one of the propositions attributes, which was causing this exception in the logs but there the User Interface wizards does not show any indication of an error.

Root Cause

While importing the file, if there is a new line character within the CSV fields, these new line characters are treated incorrectly and parsed as if it's the end of a row in CSV.


Apply HFix-25420 which encloses the data from the fields which may contain new line characters, in double quotes while exporting.

​And while importing, parsing logic has been changed to handle new line characters within the fields.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us