Problems with GWT-RPC: encodedRequest cannot be empty

1,306 views
Skip to first unread message

kishorpatel415

unread,
Apr 16, 2012, 1:08:41 PM4/16/12
to google-we...@googlegroups.com
Hi,

We are using GWT 2.3. Our application is encountering the error
"encodedRequest cannot be empty". Full stack trace below. This is an
intermittent error that occurs when making GWT-RPC calls.

Please let me know if there are any work around or solutions
available. Thank you.

Stack Trace:
Exception while dispatching incoming RPC call
java.lang.IllegalArgumentException: encodedRequest cannot be empty
        at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:229)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
206)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
248)
        at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

Client Environment
- Browser: Microsoft Internet Explorer 8
- Operating System: MS Windows 7

Server Environment
- App Server: Tomcat 7
- Operating System: MS Windows Server 2008






GWTFan

unread,
Feb 21, 2013, 5:27:44 PM2/21/13
to google-we...@googlegroups.com
We are also experiencing this problem. 
We use GWT 2.4 and Glassfish application server.

NTLM is specific to Windows, But our app server runs on Linux, 
Any suggestions on any other probable cause?

Appreciate help!

On Wednesday, January 23, 2013 9:49:11 AM UTC-8, Miloslav Skacel wrote:
I'm experiencing the same problem
It looks like NTLM related problem as described here http://code.dblock.org/ntlm-please-show-id-with-every-post

Dne pondělí, 16. dubna 2012 19:08:41 UTC+2 kishorpatel415 napsal(a):

christophe...@gmail.com

unread,
Aug 12, 2013, 10:39:05 AM8/12/13
to google-we...@googlegroups.com
I've done a lot of research into this over the past couple of months - before I get into the details, my web application is using GWT 2.x running on Tomcat 7, with an Apache httpd 2.2.x and mod_jk 1.2.x setup in front.

With mod_jk version 1.2.26, I'd occasionally see the 'encodedRequest cannot be empty' error in the logs.  This would only happen in IE, for me only IE8/9.  The problem is that my server OS is Linux, so there's no way that NTLM authentication could be the issue.  In newer versions of mod_jk (1.2.37 at this writing), I would instead get a socket timeout and read error in the Tomcat logs.

This error would be logged during a polling of my web application to the server every few seconds in order to get the status of a long-running operation that had been launched in a separate thread.  The polling would happen every five seconds, but occasionally it would hang while doing this status request.

After a lot of tcpdump commands, I found that the request that hung would come on a TCP connection that was being reset by Apache; a FIN/ACK was being sent to the browser, the POST request header and body would be received by the server, and the server would continue to reset the connection.  Then, strangely enough, only the header would come back to the server from the browser.  After researching a little, I found this:


Apparently, IE will only send the headers during the re-send of the POST request.  The GWT servlet hangs trying to reading the POST body and then times out.

In true Microsoft fashion, this issue has actually been know about for a while, a hotfix was issued and installed, but NOT ENABLED on the client machine.  If you don't want to force all of your users to edit their registry, you need to either disable HTTP Keep-Alive on your server or increase the Keep-Alive timeout to > 60 seconds.  For my apache httpd server, I'm setting KeepAliveTimeout to 65 and MaxKeepAliveRequests to 0 so that the server doesn't initiate connection resets to the browser.

Chris
Reply all
Reply to author
Forward
0 new messages