Wednesday, December 30, 2015

Re: How to solve RPC error: Character Encoding is 'text/'. Expected 'UTF-8'

Somehow your HttpServletRequest is "broken" and returns "text/" as character encoding: https://github.com/gwtproject/gwt/blob/ad8ed35116bf22efdfdcf6984a3a3d79e26ded04/user/src/com/google/gwt/user/server/rpc/RPCServletUtils.java#L425
This might be due either to bad parsing somewhere (Tomcat?), a broken servlet filter that passes a broken request down the chain, or a ill-formed Content-Type header received by Tomcat. Logging of Content-Type request headers at different stages could help identify what's broken.

On Wednesday, December 30, 2015 at 5:00:09 PM UTC+1, Ed wrote:
Sometimes I do get the following stacktrace during RPC communication with the Tomcat backend.
Any idea how to solve this, and what could cause this ?
- Ed

javax.servlet.ServletException: Character Encoding is 'text/'. Expected 'UTF-8' 

    at com.google.gwt.user.server.rpc.RPCServletUtils.checkCharacterEncodingIgnoreCase(RPCServletUtils.java:439) 

    at com.google.gwt.user.server.rpc.RPCServletUtils.readContent(RPCServletUtils.java:212) 

    at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsGwtRpc(RPCServletUtils.java:252) 

    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.readContent(AbstractRemoteServiceServlet.java:182)






--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment