|
Hi,
Actually I had the problem when using jetty-7.6.0-RC3 or previous versions, but when ever EOFException occurs dwr request is received twice at server. The following is that exception: Nov 15, 2011 4:43:18 PM org.directwebremoting.dwrp.BaseCallHandler marshallException WARNING: Exception while processing batch org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException at org.eclipse.jetty.io.UncheckedPrintWriter.setError(UncheckedPrintWriter.java:107) at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:280) at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:295) at org.eclipse.jetty.io.UncheckedPrintWriter.print(UncheckedPrintWriter.java:460) at org.eclipse.jetty.io.UncheckedPrintWriter.println(UncheckedPrintWriter.java:642) at org.directwebremoting.dwrp.PlainCallHandler.sendOutboundScriptPrefix(PlainCallHandler.java:49) at org.directwebremoting.dwrp.BaseCallHandler.marshallOutbound(BaseCallHandler.java:317) at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:105) at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120) at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) at org.eclipse.jetty.server.Server.handle(Server.java:346) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529) at java.lang.Thread.run(Unknown Source) Caused by: org.eclipse.jetty.io.EofException at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:149) at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:96) at java.io.ByteArrayOutputStream.writeTo(Unknown Source) at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:283) at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:107) at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:271) ... 32 more Nov 15, 2011 4:43:18 PM org.directwebremoting.servlet.ExceptionHandler handle WARNING: Error: org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException Now I am using dwr-3.0.0-RC3-dev-363 and jetty-7.6.0. i am getting the same problem of dwr request being sent twice, but the difference is I do not get any exception at server side. This behavior happens only at sometimes, but can be reproducible. Can some one help me, what can cause this kind of behavior? Thanks in advance |
|
Sorry it took so long Deb. Can you send us a war file where the problem can be reproduced?
|
|
Thanks for the reply,
Actually this problem is in our development project, so i will try to reproduce the same with some simple project and send you the war. Mean while can i know some details about the following exception: Nov 15, 2011 4:43:18 PM org.directwebremoting.dwrp.BaseCallHandler marshallException WARNING: Exception while processing batch |
|
That is a debug level statement that is printed when an Exception is
being serialized by DWR. On 02/10/2012 04:03 AM, deb wrote: > Thanks for the reply, > Actually this problem is in our development project, so i will try to > reproduce the same with some simple project and send you the war. > > Mean while can i know some details about the following exception: > *Nov 15, 2011 4:43:18 PM org.directwebremoting.dwrp.BaseCallHandler > marshallException > WARNING: Exception while processing batch* > > -- > View this message in context: http://dwr.2114559.n2.nabble.com/DWR-request-sent-twice-tp7250229p7272276.html > Sent from the DWR - Users mailing list archive at Nabble.com. > |
|
Hi David, sorry for the delay, i tried to reproduce this with some simple project, but there i did not get such a behavior.
After upgrading to jetty-7.6.0, i am not able reproduce it easily. I am attaching the call level DWR log when i got this kind of requests being sent twice. This behavior is reproducible in Safari, can i know how to debug this further. DWR LOG: Feb 13, 2012 4:06:32 PM org.directwebremoting.impl.DefaultRemoter execute INFO: Exec: XdqServer.newTab(boolean), id=0 Feb 13, 2012 4:06:32 PM org.directwebremoting.impl.DefaultRemoter execute INFO: Exec: XdqServer.newTab(boolean), id=0 Feb 13, 2012 4:06:32 PM org.directwebremoting.impl.CreatorModule executeMethod INFO: Object found in application. NewTab Request from client-side Creating new tab, id --> 9 Feb 13, 2012 4:06:32 PM org.directwebremoting.impl.CreatorModule executeMethod INFO: Object found in application. NewTab Request from client-side Creating new tab, id --> 10 |
|
Deb,
This sounds specific to your application. It appears two requests are coming in at the same time. We have a thorough page on troubleshooting here - http://directwebremoting.org/dwr/support/common_problems.html. I would start with placing breakpoints in the JS where that call is originating and seeing if it is indeed being called twice. On 02/13/2012 04:30 AM, deb wrote: > Hi David, sorry for the delay, i tried to reproduce this with some simple > project, but there i did not get such a behavior. > After upgrading to jetty-7.6.0, i am not able reproduce it easily. > I am attaching the call level DWR log when i got this kind of requests being > sent twice. > This behavior is reproducible in Safari, can i know how to debug this > further. > > *DWR LOG:* > Feb 13, 2012 4:06:32 PM org.directwebremoting.impl.DefaultRemoter execute > INFO: Exec: XdqServer.newTab(boolean), id=0 > Feb 13, 2012 4:06:32 PM org.directwebremoting.impl.DefaultRemoter execute > INFO: Exec: XdqServer.newTab(boolean), id=0 > Feb 13, 2012 4:06:32 PM org.directwebremoting.impl.CreatorModule > executeMethod > INFO: Object found in application. > > NewTab Request from client-side > Creating new tab, id --> 9 > > Feb 13, 2012 4:06:32 PM org.directwebremoting.impl.CreatorModule > executeMethod > INFO: Object found in application. > > NewTab Request from client-side > Creating new tab, id --> 10 > > > -- > View this message in context: http://dwr.2114559.n2.nabble.com/DWR-request-sent-twice-tp7250229p7280071.html > Sent from the DWR - Users mailing list archive at Nabble.com. > |
|
Thanks David,
I tried fiddler and Safari's network tracker which shows up all Http requests and responses, the dwr request(XdqServer.newTab()) is sent only once from the client side(browser). http://dwr.2114559.n2.nabble.com/file/n7283743/dwr_err.jpg Is there anything missing or wrong in the dwr configuration that is given below: web.xml dwr.xml -- View this message in context: http://dwr.2114559.n2.nabble.com/DWR-request-sent-twice-tp7250229p7283743.html Sent from the DWR - Users mailing list archive at Nabble.com. |
|
This post has NOT been accepted by the mailing list yet.
In reply to this post by david@butterdev.com
Thanks David,
I tried fiddler and Safari's network tracker which shows up all Http requests and responses, the dwr request(XdqServer.newTab()) is sent only once from the client side(browser). The following screenshot shows safari network log: ![]() Is there anything missing or wrong in the dwr configuration that is given below? web.xml
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>activeReverseAjaxEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>accessLogLevel</param-name>
<param-value>CALL</param-value>
</init-param>
<init-param>
<param-name>initApplicationScopeCreatorsAtStartup</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>dwr.xml <dwr>
<allow>
<create creator="new" javascript="XdqServer" scope="application">
<param name="class" value="clientServer.XdqServer" />
</create>
</allow>
</dwr>
|
|
In reply to this post by deb
Sent only once? The screenshot clearly shows 3 requests. One then a response and then two back to back.
On Tue, Feb 14, 2012 at 5:39 AM, deb <[hidden email]> wrote: Thanks David, |
|
Sorry David,
I should have been more clear in the previous post. There dwr request means the XdqServer.newTab request, but not the other two requests i.e., XdqServer.switchTab. The XdqServer.newTab request is being processed twice in the server side. But the fiddler and safari network tracker log shows only one request sent to server. Is there anything wrong or missing in the dwr configuration? |
|
David,
Thanks for the DWR Troubleshooting link, it helped a lot in debugging this issue. The following fiddler log shows only one XdqServer.newTab request(for your information batchId=55 in fiddler.log), in response to that three newTab return data are there in the ReverseAjax response(for your information batchId=54 in fiddler.log). fiddler.log The following server log shows servlet request recieved three times and according to that response is pushed back. server_log.txt I guess there is nothing to do with dwr. Please take a look at logs and let me know if anything that i misunderstood. |
|
Deb,
I don't see anything wrong with your configuration. I am a bit confused here, in the log you originally sent there is no indication of Reverse Ajax use (lotherwise we would see a poll handler in the stack): at org.directwebremoting.dwrp.PlainCallHandler.sendOutboundScriptPrefix(PlainCallHandler.java:49) at org.directwebremoting.dwrp.BaseCallHandler.marshallOutbound(BaseCallHandler.java:317) at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:105) at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120) at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141) Now it seems you are using reverse ajax. Is the code that is creating the tabs pushed to the clients using Reverse AJAX? If so keep in mind your code is what is creating and pushing the tabs. Since you can't send us a sample application reproducing the problem it is very difficult to help you more. On 02/15/2012 12:14 AM, deb wrote: > David, > Thanks for the DWR Troubleshooting link, it helped a lot in debugging > this issue. > > The following fiddler log shows only one *XdqServer.newTab* > request(for your information *batchId=55* in fiddler.log), > in response to that *three newTab return data* are there in the ReverseAjax > response(for your information *batchId=54* in fiddler.log). > http://dwr.2114559.n2.nabble.com/file/n7286758/fiddler.log fiddler.log > > The following server log shows servlet request recieved three times and > according to that response is pushed back. > http://dwr.2114559.n2.nabble.com/file/n7286758/server_log.txt server_log.txt > > I guess there is nothing to do with dwr. > Please take a look at logs and let me know if anything that i misunderstood. > > > -- > View this message in context: http://dwr.2114559.n2.nabble.com/DWR-request-sent-twice-tp7250229p7286758.html > Sent from the DWR - Users mailing list archive at Nabble.com. > |
|
David,
Since the creation of tabs is dependent on other functionality in turn involves lots of other stuff to be setup, i have not sent anything so that you can check. And i should have mentioned it before that we are using dwr reverse ajax for creating tabs and also other functionality, sorry for that. if we check the fiddler.log and server_log.txt, then as per my knowledge i don't see any problem with dwr. fiddler.log server_log.txt Can you just take a look at them once because i may be misunderstood. If we can't decide anything with the resources (logs & screenshot) that i sent to you, i will isolate the tab creation functionality and send you a war. Thanks in advance |
|
Deb, the logs don't help me much. As far as sending me a war you need to investigate your code and show that the problem is with DWR and not your code first
On Wed, Feb 15, 2012 at 7:58 AM, deb <[hidden email]> wrote: David, |
| Powered by Nabble | See how NAML generates this page |
