Request.updateCounters causes a StringIndexOutOfBoundsException
Issue
- We sometimes see exceptions like the following for requests:
java.lang.StringIndexOutOfBoundsException: String index out of range: 1234
at java.lang.String.checkBounds(String.java:401)
at java.lang.String.<init>(String.java:442)
at org.apache.tomcat.util.buf.ByteChunk.toStringInternal(ByteChunk.java:514)
at org.apache.tomcat.util.buf.StringCache.toString(StringCache.java:315)
at org.apache.tomcat.util.buf.ByteChunk.toString(ByteChunk.java:507)
at org.apache.tomcat.util.buf.MessageBytes.toString(MessageBytes.java:207)
at org.apache.coyote.RequestInfo.updateCounters(RequestInfo.java:156)
at org.apache.coyote.Request.updateCounters(Request.java:518)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:461)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:385)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
at java.lang.Thread.run(Thread.java:662)
Environment
- JBoss Enterprise Application Platform (EAP)
- JBoss Enterprise Web Server (EWS)
- Apache httpd
- mod_jk
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
