MalformedInputException when calling HttpServletRequest.getReader() within a servlet for JBoss EAP

Solution Verified - Updated -

Issue

Using an HTTP client an XML document with a character encoding of ISO-8859-1 is posted to a servlet running on JBoss EAP. The XML document has a Ñ (special character) in it.

The following error is shown in the server.log:

java.nio.charset.MalformedInputException: Input length = 1
        at java.nio.charset.CoderResult.throwException(CoderResult.java:260)
        at org.apache.tomcat.util.buf.B2CConverter.convert(B2CConverter.java:117)
        at org.apache.catalina.connector.InputBuffer.realReadChars(InputBuffer.java:404)
        at org.apache.tomcat.util.buf.CharChunk.substract(CharChunk.java:383)
        at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:417)
        at org.apache.catalina.connector.CoyoteReader.read(CoyoteReader.java:93)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
    • 6.x

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
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.