GWT explicitly sets the character encoding as UTF-8, and performs a check on
the server side to ensure it. If you look at RPCServletUtils, the method
checkCharacterEncoding() performs this check, and only then proceeds to line
number 185 where it dies. So it certainly isn't a problem with ISO-8859-1.

This exception is thrown when the POST body is empty (byteCount=-1). It
seems that the incoming request has the right headers (content-length,
content-type and right encoding), but the payload is getting truncated.
Maybe an intermediary between your server and browser is misbehaving?

I suggest you co-relate these exceptions with your access.logs. Try to
narrow down on ip ranges/specific RPC services. Also, if you have any client
side logging, or if you are using google analytics, you could perhaps narrow
down on the browsers that encounter this problem. If you are able to narrow
down, you are likely to get to the root cause.

That's all I can think of at the moment. Hopefully, someone else has a
better idea.

--Sri



On 14 April 2010 23:55, Simon Botting <simon.bott...@enbuenosaires.com>wrote:

> Hi,
>
> The following exception is thrown for around 5% of the requests that
> are made through gwt rpc on our production server - the number of
> bytes changes (in this case its 199)
>
> 04/13 21:36:20 ERROR in
> web.HibernateSessionRequestFilter.doFilter(line:57): Exception while
> dispatching incoming RPC call
> javax.servlet.ServletException: Client did not send 199 bytes as expected
>        at
> com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8(RPCServletUtils.java:185)
>        at
> com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.readContent(AbstractRemoteServiceServlet.java:179)
>        at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:215)
>        at
> com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>
> I think this is the version of the src file:
>
>
> http://code.google.com/p/google-web-toolkit/source/browse/branches/snapshot-2010.01.05-r7362/user/src/com/google/gwt/user/server/rpc/RPCServletUtils.java
>
> I suspect that it's something to do with the fact that the html page
> that hosts the gwt module is in charset iso-8859-1 and not in utf-8,
> although I'm surprised that it only happens periodically in 5% of the
> cases, perhaps its a particular browser / version combination.  The
> site is a spanish language site, so its very possible that the
> information sent would have characters with accents.  Has anyone else
> had this problem is there a way that I can indicate to GWT that the
> charset of the page is iso-88591.
>
> Any suggestions greatly appreciated.
>
> Cheers
> Simon
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to