<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Exception caught trying to measure REST API call: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 in Tomcat Log file</title><link>https://community.appian.com/discussions/f/administration/18022/exception-caught-trying-to-measure-rest-api-call-java-lang-stringindexoutofboundsexception-string-index-out-of-range--1-in-tomcat-log-file</link><description>We have seen below error reported sometime in tomcat-stdOut.log file. 
 Any idea what is causing this?. 
 ERROR com.appiancorp.tempo.util.PerformanceLogFilter - Exception caught trying to measure REST API call: java.lang.StringIndexOutOfBoundsException</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Exception caught trying to measure REST API call: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 in Tomcat Log file</title><link>https://community.appian.com/thread/72616?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 04:56:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0dedc312-548f-4911-89d4-9435f3f031cb</guid><dc:creator>delonb0001</dc:creator><description>&lt;p&gt;When using the Java substring() method, a subset of the character sequence can be extracted from a string. The &lt;a href="http://net-informations.com/java/string/substring.htm"&gt;substring&lt;/a&gt; index must be any value from 0 to the length of a string. The java.lang.StringIndexOutOfBoundsException thrown by String methods to indicate that the beginIndex is negative , or endIndex is larger than the length of this String object, or beginIndex is larger than endIndex.&lt;/p&gt;
&lt;p&gt;How to solve the StringIndexOutOfBoundsException&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check the length of the string before using substring()&lt;/li&gt;
&lt;li&gt;Exception handling using try...catch.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>