This exception peppers our production catalina logs on a simple ‘getParameter()’ call.
WARNING: Parameters: Character decoding failed. Parameter skipped. java.io.CharConversionException: EOF at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:82) at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:48) at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:411) at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:393) at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:509) at org.apache.tomcat.util.http.Parameters.handleQueryParameters(Parameters.java:266) at org.apache.catalina.connector.Request.parseParameters(Request.java:2361) at org.apache.catalina.connector.Request.getParameter(Request.java:1005) at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353) at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:158)
Or Sometimes:
java.io.CharConversionException: isHexDigit at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:87) at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:48) at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:411) at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:393) at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:509) at org.apache.tomcat.util.http.Parameters.handleQueryParameters(Parameters.java:266) at org.apache.catalina.connector.Request.parseParameters(Request.java:2361) at org.apache.catalina.connector.Request.getParameter(Request.java:1005) at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353) at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:158)
Just hypothesizing here. Seems like the URL-decoding of parameters or their values fails (URL-encoding means encoding some characters using the %XX or %XXXX notation where XX or XXXX is the hexadecimal code of the character in ISO-8859-1 or Unicode). In the first case the error might be happening because there aren’t enough hexadecimal characters after the % character. In the second case this might be happening because a character after the % character isn’t hexadecimal.