atom feed4 messages in [dwr-user] Possible Bug? No data ...
FromSent OnAttachments
David DeMayMar 10, 2006 10:56 am 
Joe WalkerMar 24, 2006 4:36 am 
John KleinschmidtMar 24, 2006 7:14 am 
rahibleAug 25, 2006 11:32 am 
Subject:Re: [dwr-user] Possible Bug? No data received from server DWR 1.0 Exception in DWR
From:rahible (
Date:Aug 25, 2006 11:32:32 am

Thank you for the DWREngine.setMethod(DWREngine.IFrame); suggested fix. I have argued off and on for nearly a week on this issue. That solved it immediatedly.


Joe Walker wrote:

Sorry for the delay, I would suggest having a go with iframe remoting.

You can either do:


For global use, or:

Remote.method(params { callback:function(data) { ... }, method:DWREngine.IFrame });

For local use.

On 3/10/06, David DeMay <> wrote:

Hello -

I have read through some similar posts, but would lke to share the error our team is receiving while using DWR.

We get an error that "No data was received from server" with one of our asynchronous calls made via DWR. I have seen that it occurs in engine.jsand have not wanted to make any changes there unless I absolutely had to.

Here is the kicker with this error. It only happens in Firefox, but I was able to get a similar error (continue reading) in Internet Explorer. I'm assuming DWR uses XMLHttpRequest for FF and ActiveX for IE Ajax support? The problem in IE was easily fixed. However, in firefox, its a real pain. The only way I can make it stop is using the javascript setInterval(func, delay) to poll for the data received.

I have been using DWR 1.0 very very sucessfully and think it is a great way to get ajax into the mainstream. For this error, I threw the DWR 1.1jar into our library of jars for the next build to see if the error had been fixed. Instead of it being fixed, it gave me the following information that might be very helpful:

[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]"nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://<localhost>/engine.js :: anonymous :: line 530" data : no]

One reason this makes no sense is that (without runing a debugger as someone else with this error in an earlier post did) the added user id data is persisted. I can do a reload of the main page and the data shows up in the table.

Here is a breakdown of how DWR is used within the application:

1.) Parent window page loads, onload, a table is populated with the current state of members of a project team. (data is queried/received via DWR) Next to the table listing, are buttons to add more members, remove everyone, or remove a single user. This call via DWR happens any time there are modifications to the table/project team.

(Our problem happens only when we try to add people, remove, and clear work correctly)

2.) User clicks the add members button on the table user interface in firefox 1.5 browser. The javascript pops up a JSP file in a popup window we call the "user picker window" This window, has a html form with 3 text inputs to search with, a multi-select that shows matching users (results returned by DWR), and a button to initiate a function to pass the users selected back to the parent window. The popup window should then close. This is where we believe the error occurs! The alert message 'No data received from server' appears and our script stops.

However, IF the POPUP is *NOT* closed programatically with window.close() method, the alert error message just described never happens in Firefox!!!!

Internet explorer, it always works! The one exception I referred to earlier with IE was I didn't nullify the window handle for the previous popup. (Add button clicked multi time sin same browser session) This crashed IE completely. What is interesting about this is it appears the browsers window is tightly coupled to the ajax call or put a different way... it's really difficult to do ajax in multiple windows because the windows must stay open until asynchronous process is truely complete?!? (even after call back is called, something in memory needs to be garbage collected?)

3.) Upon receiving the users back in the main window as an array ( array.length > 0) we proceed to do another DWR call to add Members to the project. We tried to do this an event driven function (user clicked add users button in popup window) The DWR call does seem to run okay and persist the member usernames (so that a page refresh shows them in our project team's list) but before the callback function for this DWR call runs, the error 'Data not received from server' alert pops up and engine.js never calls the passed in callback function. That callback function is what originally was supposed to refresh the table after the add was complete.


The issue seems to be revolved around when to close the popup window. I have one idea left which is try to pass the function that does the dwr call into another function in the popup window, so it can be executed there. We just need to try and avoid setInterval(), eval(), and maing the jsp tightly coupled to one servlet app. especially a generic user picker.

For now, we'll continue to use setInterval (checking for the data in array on interval and closing popup window after) if passing in the function with the DWR call doesn't take care of it.

Joe, I would really appreciate your help and could look into providing some code samples or screen shots. I really want to figure out the reason it acts this way.

Thanks, David DeMay