Tomcat AJP NIO connector throws java.nio.BufferOverflowException

Solution Verified - Updated -

Issue

  • Tomcat throws the following exception when using NIO for the AJP connector:
SEVERE: Error processing request
java.nio.BufferOverflowException
    at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:183)
    at org.apache.coyote.ajp.AjpNioProcessor.output(AjpNioProcessor.java:296)
    at org.apache.coyote.ajp.AbstractAjpProcessor$SocketOutputBuffer.doWrite(AbstractAjpProcessor.java:1195)
    at org.apache.coyote.Response.doWrite(Response.java:520)
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:408)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
    at org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.java:491)
    at org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:464)
    at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:293)
    at org.apache.catalina.connector.Response.finishResponse(Response.java:510)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:435)
    at org.apache.coyote.ajp.AjpNioProcessor.process(AjpNioProcessor.java:177)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)

Environment

  • Tomcat
  • mod_jk

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In