Monday, March 25, 2013

Connection of atmosphere and comet with gwt not working

Hi All,

I recently starting using Atmosphere, and its great, but i am facing some problems . Currently i have downloaded gwt-atmosphere-chat example and all the required .jar files. And follow all the steps required for this application. But in this examples i am not able to find out rpc(like ChatService, ChatServiceAsyn, ChatServiceImpl) files.
There is only one mapping in web.xml. And that is AtmosphereServlet.
So the below error is occurred. Please take a look at it and suggest.

This is my Development Mode

09:20:22.310 [ERROR] [chat1] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (NS_ERROR_DOM_INVALID_STATE_ERR) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(61), JavaScript object(56), JavaScript object(69)]): An attempt was made to use an object that is not, or is no longer, usable
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    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:242)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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:293)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Unknown Source)



09:20:22.620 [ERROR] [chat1] Tue Mar 26 09:20:22 IST 2013 com.client.Chat
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=/chat1/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:35)
    at org.atmosphere.gwt.client.impl.HTTPRequestCometTransport.onLoaded(HTTPRequestCometTransport.java:174)
    at org.atmosphere.gwt.client.impl.HTTPRequestCometTransport.access$3(HTTPRequestCometTransport.java:171)
    at org.atmosphere.gwt.client.impl.HTTPRequestCometTransport$3.onReadyStateChange(HTTPRequestCometTransport.java:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    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:242)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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:293)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Unknown Source)


This is my console

Mar 26, 2013 9:20:07 AM org.atmosphere.cpr.AtmosphereFramework loadAtmosphereDotXml
INFO: Installed AtmosphereHandler AtmosphereGwtAtmosphereHandler mapped to context-path: /chat/gwtComet
Mar 26, 2013 9:20:07 AM org.atmosphere.cpr.AtmosphereFramework autoDetectWebSocketHandler
INFO: Auto detecting WebSocketHandler in /WEB-INF/classes/
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework initWebSocket
INFO: Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework autoDetectContainer
INFO: Atmosphere is using async support: org.atmosphere.container.JettyCometSupport running under container: jetty-6.1.x
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Installed Default AtmosphereInterceptor [Android Interceptor Support, SSE Interceptor Support, JSONP Interceptor Support, Atmosphere JavaScript Protocol, Browser disconnection detection]. Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults in your xml to disable them.
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework init
WARNING: No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the org.atmosphere.cache.UUIDBroadcasterCache
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework init
INFO: Shared ExecutorService supported: true
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework init
INFO: HttpSession supported: false
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework init
INFO: Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework init
INFO: Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework init
INFO: Using Broadcaster: org.atmosphere.cpr.DefaultBroadcaster
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework init
INFO: Atmosphere Framework 1.0.12 started.
Mar 26, 2013 9:20:08 AM org.atmosphere.cpr.AtmosphereFramework init
INFO:

    For Commercial Support, visit
    http://www.async-io.org/ or send an email to support@async-io.org

Tue Mar 26 09:20:22 IST 2013 org.atmosphere.gwt.client.AtmosphereClient
INFO: Created transport: org.atmosphere.gwt.client.impl.WebSocketCometTransport
Tue Mar 26 09:20:22 IST 2013 org.atmosphere.gwt.client.impl.WebSocketCometTransport
FINE: Creating websocket with url: ws://127.0.0.1:8888/chat1/gwtComet/room1?dsm=RPC&sm=RPC&t=A7RL9O&c=1&tr=WebSocket
[WARN] 404 - GET /chat1/gwtComet/room1?dsm=RPC&sm=RPC&t=A7RL9O&c=1&tr=WebSocket (127.0.0.1) 1406 bytes
   Request headers
      Host: 127.0.0.1:8888
      User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      Accept-Language: en-us,en;q=0.5
      Accept-Encoding: gzip, deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Connection: keep-alive, Upgrade
      Sec-WebSocket-Version: 8
      Sec-WebSocket-Origin: http://127.0.0.1:8888
      Sec-WebSocket-Key: BzhJgZJABcLGnm9yD0s2nw==
      Pragma: no-cache
      Cache-Control: no-cache
      Upgrade: websocket
   Response headers
      Content-Type: text/html; charset=iso-8859-1
      Content-Length: 1406
Tue Mar 26 09:20:22 IST 2013 com.client.Chat
INFO: comet.beforeDisconnected
Tue Mar 26 09:20:22 IST 2013 org.atmosphere.gwt.client.impl.WebSocketCometTransport
FINE: Websocket connection closed
Tue Mar 26 09:20:22 IST 2013 org.atmosphere.gwt.client.AtmosphereClient
INFO: Server does not support WebSockets
[WARN] 404 - GET /chat1/gwtComet/room1?dsm=RPC&sm=RPC&t=A7RLD3&c=2&tr=HTTPRequest (127.0.0.1) 1406 bytes
   Request headers
      Host: 127.0.0.1:8888
      User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
      Accept: application/comet
      Accept-Language: en-us,en;q=0.5
      Accept-Encoding: gzip, deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Connection: keep-alive
      Referer: http://127.0.0.1:8888/Chat1.html?gwt.codesvr=127.0.0.1:9997
   Response headers
      Content-Type: text/html; charset=iso-8859-1
      Content-Length: 1406
Tue Mar 26 09:20:22 IST 2013 com.client.Chat
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=/chat1/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:35)
    at org.atmosphere.gwt.client.impl.HTTPRequestCometTransport.onLoaded(HTTPRequestCometTransport.java:174)
    at org.atmosphere.gwt.client.impl.HTTPRequestCometTransport.access$3(HTTPRequestCometTransport.java:171)
    at org.atmosphere.gwt.client.impl.HTTPRequestCometTransport$3.onReadyStateChange(HTTPRequestCometTransport.java:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    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:242)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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:293)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Unknown Source)

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

No comments:

Post a Comment