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

SA-18852

Summary



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(String.java:1911)
at com.pegarules.generated.activity.ra_action_pxuploadcsvresults_d6880d98e7f5bcf7025dc7520c94f205.step7_circum0(ra_action_pxuploadcsvresults_d6880d98e7f5bcf7025dc7520c94f205.java:651)
at com.pegarules.generated.activity.ra_action_pxuploadcsvresults_d6880d98e7f5bcf7025dc7520c94f205.perform(ra_action_pxuploadcsvresults_d6880d98e7f5bcf7025dc7520c94f205.java:181)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_pzinitializeanduploadcsv_d15ed356d5b5dd20432637606b830775.step2_circum0(ra_action_pzinitializeanduploadcsv_d15ed356d5b5dd20432637606b830775.java:230)
at com.pegarules.generated.activity.ra_action_pzinitializeanduploadcsv_d15ed356d5b5dd20432637606b830775.perform(ra_action_pzinitializeanduploadcsv_d15ed356d5b5dd20432637606b830775.java:86)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.activity.ra_action_pzrunactionwrapper_056ec03796d8a13802f156886066036d.step1_circum0(ra_action_pzrunactionwrapper_056ec03796d8a13802f156886066036d.java:318)
at com.pegarules.generated.activity.ra_action_pzrunactionwrapper_056ec03796d8a13802f156886066036d.perform(ra_action_pzrunactionwrapper_056ec03796d8a13802f156886066036d.java:69)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:646)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)


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.

Resolution



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