Request.updateCounters causes a StringIndexOutOfBoundsException

Solution Unverified - Updated -

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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content