Re: RPC call from server to client
Hi,
I arrived at the following state by trial and error:
included jars:
atmosphere-gwt-client-1.0.2.jar
atmosphere-gwt-common-1.0.2.jar
atmosphere-gwt-server-1.0.2.jar
atmosphere-runtime-1.0.2.jar
example project:
I just fetched the files from the example and put them into a new GWT project, because I do not use Maven.
Especially, I did not define any servlets.
When starting the app I get the runtime error attached below.
The code tries to access "testatmosphere/gwtComet/room1", so I thought there should be a servlet. I defined ChatHandler to be a servlet, but this also did not work, because ChatHandler is not derived of the servlet class.
I think I am close to a working example now, but I need the final hint from you! :-)
Magnus
Sun Oct 21 01:10:58 CEST 2012 org.atmosphere.gwt.client.AtmosphereClient INFO: Created transport: org.atmosphere.gwt.client.impl.WebSocketCometTransport
Sun Oct 21 01:10:58 CEST 2012 org.atmosphere.gwt.client.AtmosphereClient INFO: Server does not support WebSockets
Sun Oct 21 01:10:58 CEST 2012 test.client.GWTDemo SEVERE: comet.error [connected=false] (404)
com.google.gwt.user.client.rpc.StatusCodeException: 404 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 404 NOT_FOUND</title> </head> <body><h2>HTTP ERROR: 404</h2><pre>NOT_FOUND</pre> <p>RequestURI=/testatmosphere/gwtComet/room1</p><p><i><small><a href="http://jetty.mortbay.org/">Powered by Jetty://</a></small></i></p><br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html>
at org.atmosphere.gwt.client.impl.StreamingProtocolTransport.onReceiving(StreamingProtocolTransport.java:50)
at org.atmosphere.gwt.client.impl.HTTPRequestCometTransport.onLoaded(HTTPRequestCometTransport.java:204)
at org.atmosphere.gwt.client.impl.HTTPRequestCometTransport.access$3(HTTPRequestCometTransport.java:201)
at org.atmosphere.gwt.client.impl.HTTPRequestCometTransport$3.onReadyStateChange(HTTPRequestCometTransport.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
at java.lang.Thread.run(Thread.java:636)
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/kL6j4QCprQcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home