Support Article
Unable to Parse CSV files
SA-104613
Summary
IllegalArgumentException occurs when parsing CSV files.
Error Messages
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:467)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:667)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Steps to Reproduce
- Open any ParseDelimited Rule.
- Click Run locally.
- Use from File and provide a .CSV File.
- Observe the above exception.
Root Cause
A defect in Pegasystems’ code or rules.
The issue occurs while running Tomcat 8.5 and later versions when URI requests contain special characters such as, '\', '/', etc.
Resolution
Make the following change to the operating environment:
On inspecting the HTTP request, the issue occurred due to the presence of the '\' character in the FilePath property.
Add the below relaxedQueryChars setting (for in-house Pega Platform 8.3.1 instance (Windows)),
<Connector port="8830" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" relaxedQueryChars="\"/>
Add a few more characters to Relaxation as below (for Linux),
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" relaxedQueryChars='\^{}[]|"' />
Published August 8, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.