Atmosphere - please work for me!

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Atmosphere - please work for me!

stuart.roebuck
I've given up trying to get atmosphere to work in my Scalatra project (previously using socket-io happily until something changed recently and they decided to support Atmosphere moving forward).

So I decided to go to first principles.

I've downloaded the meteor-chat sample from the github repository and I've simply modified the build so that it uses sbt and loads in jetty to run under (and excludes atmosphere-ping because I've got ping overload!)

I run it in sbt with "jetty-run" and bring up my browser and show "http://localhost:8080/".

It successfully displays the "Glassfish Chat" window and allows me to login with my name.  My name is then displayed and it invites me to chat.  However, when I chat it does absolutely nothing else on screen when I submit the chat text with the submit button.

So I looked at the code and I noticed that the console was displayed a 404 error trying to access `/atmosphere-meteor-chat/Meteor` which doesn't seem to correspond with the `web.xml` file which is set up for just `/Meteor`.  So I changed line 3 of `application.js` to:

    url: '/Meteor',

Now I get the stack trace show below [bottom].

To enable someone to easily reproduce, debug, help.  I have posted this mini-project on github here:
   
    https://github.com/sroebuck/scala-meteor-chat

Please help - I have now spent two whole weeks just trying to get atmosphere to run!



> jetty-run
[info] jetty-7.3.1.v20110307
[info] NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
[info] started o.e.j.w.WebAppContext{/,file:/Users/sroebuck/Dropbox/Projects/scala-meteor-chat/target/webapp/},/Users/sroebuck/Dropbox/Projects/scala-meteor-chat/target/webapp
16:50:53.650 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - initializing atmosphere framework: 0.8-SNAPSHOT
16:50:53.658 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - using default broadcaster class: class org.atmosphere.cpr.DefaultBroadcaster
16:50:53.680 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - Atmosphere is using comet support: org.atmosphere.container.Servlet30Support running under container: jetty/7.3.1.v20110307 using javax.servlet/3.0
16:50:53.680 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - using broadcaster class: org.atmosphere.cpr.DefaultBroadcaster
16:50:53.684 [main] INFO  o.a.h.ReflectorServletProcessor - Installing Servlet org.atmosphere.samples.chat.MeteorChat
16:50:53.684 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - started atmosphere framework: 0.8-SNAPSHOT
[info] Started [hidden email]
> 16:51:00.394 [qtp302043267-61 - /Meteor?0] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [GET /Meteor?0]@1393180668 org.eclipse.jetty.server.Request@530a3ffc
 HttpServletResponse: HTTP/1.1 200


16:51:00.409 [qtp302043267-61 - /Meteor?0] INFO  o.a.commons.util.EventsLogger - onSuspend(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=null, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
16:51:00.416 [qtp302043267-61 - /Meteor?0] DEBUG o.a.container.Servlet30Support - Suspending response: HTTP/1.1 200
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie: JSESSIONID=1qgkjq7ku165d16wro6xydooql;Path=/
Expires: -1
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Access-Control-Allow-Origin: *


16:51:00.416 [Atmosphere-AsyncWrite-0] INFO  o.a.commons.util.EventsLogger - onBroadcast(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=<script type='text/javascript'>
window.parent.app.update({ name: "localhost", message: "has suspended a connection from 0:0:0:0:0:0:0:1%0" });
</script>
, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
[warn] Error for /Meteor
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.isAsyncStarted()Z
    at org.atmosphere.container.Servlet30Support.suspend(Servlet30Support.java:136)
    at org.atmosphere.container.Servlet30Support.service(Servlet30Support.java:91)
    at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1182)
    at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1164)
    at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1150)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.eclipse.jetty.websocket.WebSocketServlet.service(WebSocketServlet.java:86)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)
16:51:38.895 [qtp302043267-58 - /Meteor] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [POST /Meteor]@1550100593 org.eclipse.jetty.server.Request@5c64a871
 HttpServletResponse: HTTP/1.1 200


16:51:38.898 [Atmosphere-AsyncWrite-1] INFO  o.a.commons.util.EventsLogger - onBroadcast(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=<script type='text/javascript'>
window.parent.app.update({ name: "System Message from localhost", message: "Stuart has joined." });
</script>
, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
16:51:38.909 [Atmosphere-AsyncWrite-1] DEBUG o.atmosphere.cpr.DefaultBroadcaster - onException()
org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException
    at org.eclipse.jetty.io.UncheckedPrintWriter.setError(UncheckedPrintWriter.java:107) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:280) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:295) ~[na:na]
    at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:112) ~[atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:558) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:504) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_26]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_26]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_26]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_26]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_26]
    at java.lang.Thread.run(Thread.java:680) [na:1.6.0_26]
Caused by: org.eclipse.jetty.io.EofException: null
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:149) ~[na:na]
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:96) ~[na:na]
    at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:109) ~[na:1.6.0_26]
    at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:283) ~[na:na]
    at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:107) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:271) ~[na:na]
    ... 11 common frames omitted
16:51:38.910 [Atmosphere-AsyncWrite-1] INFO  o.a.commons.util.EventsLogger - onDisconnect(): AtmosphereResourceEventImpl{isCancelled=true, isResumedOnTimeout=false, message=null, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException}
Exception in thread "Atmosphere-AsyncWrite-2" java.lang.IllegalStateException: No SessionManager
    at org.eclipse.jetty.server.Request.getSession(Request.java:1107)
    at org.eclipse.jetty.server.Request.getSession(Request.java:1097)
    at org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:168)
    at org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:63)
    at org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:179)
    at org.atmosphere.cpr.DefaultBroadcaster$4.run(DefaultBroadcaster.java:589)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
16:51:44.577 [qtp302043267-61 - /Meteor] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [POST /Meteor]@1550100593 org.eclipse.jetty.server.Request@5c64a871
 HttpServletResponse: HTTP/1.1 200



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Atmosphere - please work for me!

java.net
I remember a post before explaining similiar problems to yours while running with jetty-run.
Pierre

On 2-9-2011 18:08, Stuart Roebuck wrote:
I've given up trying to get atmosphere to work in my Scalatra project (previously using socket-io happily until something changed recently and they decided to support Atmosphere moving forward).

So I decided to go to first principles.

I've downloaded the meteor-chat sample from the github repository and I've simply modified the build so that it uses sbt and loads in jetty to run under (and excludes atmosphere-ping because I've got ping overload!)

I run it in sbt with "jetty-run" and bring up my browser and show "http://localhost:8080/".

It successfully displays the "Glassfish Chat" window and allows me to login with my name.  My name is then displayed and it invites me to chat.  However, when I chat it does absolutely nothing else on screen when I submit the chat text with the submit button.

So I looked at the code and I noticed that the console was displayed a 404 error trying to access `/atmosphere-meteor-chat/Meteor` which doesn't seem to correspond with the `web.xml` file which is set up for just `/Meteor`.  So I changed line 3 of `application.js` to:

    url: '/Meteor',

Now I get the stack trace show below [bottom].

To enable someone to easily reproduce, debug, help.  I have posted this mini-project on github here:
   
    https://github.com/sroebuck/scala-meteor-chat

Please help - I have now spent two whole weeks just trying to get atmosphere to run!



> jetty-run
[info] jetty-7.3.1.v20110307
[info] NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
[info] started o.e.j.w.WebAppContext{/,file:/Users/sroebuck/Dropbox/Projects/scala-meteor-chat/target/webapp/},/Users/sroebuck/Dropbox/Projects/scala-meteor-chat/target/webapp
16:50:53.650 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - initializing atmosphere framework: 0.8-SNAPSHOT
16:50:53.658 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - using default broadcaster class: class org.atmosphere.cpr.DefaultBroadcaster
16:50:53.680 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - Atmosphere is using comet support: org.atmosphere.container.Servlet30Support running under container: jetty/7.3.1.v20110307 using javax.servlet/3.0
16:50:53.680 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - using broadcaster class: org.atmosphere.cpr.DefaultBroadcaster
16:50:53.684 [main] INFO  o.a.h.ReflectorServletProcessor - Installing Servlet org.atmosphere.samples.chat.MeteorChat
16:50:53.684 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - started atmosphere framework: 0.8-SNAPSHOT
[info] Started [hidden email]
> 16:51:00.394 [qtp302043267-61 - /Meteor?0] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [GET /Meteor?0]@1393180668 org.eclipse.jetty.server.Request@530a3ffc
 HttpServletResponse: HTTP/1.1 200


16:51:00.409 [qtp302043267-61 - /Meteor?0] INFO  o.a.commons.util.EventsLogger - onSuspend(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=null, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
16:51:00.416 [qtp302043267-61 - /Meteor?0] DEBUG o.a.container.Servlet30Support - Suspending response: HTTP/1.1 200
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie: JSESSIONID=1qgkjq7ku165d16wro6xydooql;Path=/
Expires: -1
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Access-Control-Allow-Origin: *


16:51:00.416 [Atmosphere-AsyncWrite-0] INFO  o.a.commons.util.EventsLogger - onBroadcast(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=<script type='text/javascript'>
window.parent.app.update({ name: "localhost", message: "has suspended a connection from 0:0:0:0:0:0:0:1%0" });
</script>
, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
[warn] Error for /Meteor
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.isAsyncStarted()Z
    at org.atmosphere.container.Servlet30Support.suspend(Servlet30Support.java:136)
    at org.atmosphere.container.Servlet30Support.service(Servlet30Support.java:91)
    at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1182)
    at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1164)
    at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1150)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.eclipse.jetty.websocket.WebSocketServlet.service(WebSocketServlet.java:86)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)
16:51:38.895 [qtp302043267-58 - /Meteor] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [POST /Meteor]@1550100593 org.eclipse.jetty.server.Request@5c64a871
 HttpServletResponse: HTTP/1.1 200


16:51:38.898 [Atmosphere-AsyncWrite-1] INFO  o.a.commons.util.EventsLogger - onBroadcast(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=<script type='text/javascript'>
window.parent.app.update({ name: "System Message from localhost", message: "Stuart has joined." });
</script>
, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
16:51:38.909 [Atmosphere-AsyncWrite-1] DEBUG o.atmosphere.cpr.DefaultBroadcaster - onException()
org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException
    at org.eclipse.jetty.io.UncheckedPrintWriter.setError(UncheckedPrintWriter.java:107) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:280) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:295) ~[na:na]
    at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:112) ~[atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:558) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:504) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_26]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_26]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_26]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_26]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_26]
    at java.lang.Thread.run(Thread.java:680) [na:1.6.0_26]
Caused by: org.eclipse.jetty.io.EofException: null
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:149) ~[na:na]
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:96) ~[na:na]
    at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:109) ~[na:1.6.0_26]
    at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:283) ~[na:na]
    at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:107) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:271) ~[na:na]
    ... 11 common frames omitted
16:51:38.910 [Atmosphere-AsyncWrite-1] INFO  o.a.commons.util.EventsLogger - onDisconnect(): AtmosphereResourceEventImpl{isCancelled=true, isResumedOnTimeout=false, message=null, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException}
Exception in thread "Atmosphere-AsyncWrite-2" java.lang.IllegalStateException: No SessionManager
    at org.eclipse.jetty.server.Request.getSession(Request.java:1107)
    at org.eclipse.jetty.server.Request.getSession(Request.java:1097)
    at org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:168)
    at org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:63)
    at org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:179)
    at org.atmosphere.cpr.DefaultBroadcaster$4.run(DefaultBroadcaster.java:589)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
16:51:44.577 [qtp302043267-61 - /Meteor] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [POST /Meteor]@1550100593 org.eclipse.jetty.server.Request@5c64a871
 HttpServletResponse: HTTP/1.1 200



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Atmosphere - please work for me!

java.net
In reply to this post by stuart.roebuck
like this post: http://atmosphere-users-mailling-list.2493822.n2.nabble.com/WebSocket-doesn-t-work-with-the-jQuery-plugin-td5275556.html
Pierre

On 2-9-2011 18:08, Stuart Roebuck wrote:
I've given up trying to get atmosphere to work in my Scalatra project (previously using socket-io happily until something changed recently and they decided to support Atmosphere moving forward).

So I decided to go to first principles.

I've downloaded the meteor-chat sample from the github repository and I've simply modified the build so that it uses sbt and loads in jetty to run under (and excludes atmosphere-ping because I've got ping overload!)

I run it in sbt with "jetty-run" and bring up my browser and show "http://localhost:8080/".

It successfully displays the "Glassfish Chat" window and allows me to login with my name.  My name is then displayed and it invites me to chat.  However, when I chat it does absolutely nothing else on screen when I submit the chat text with the submit button.

So I looked at the code and I noticed that the console was displayed a 404 error trying to access `/atmosphere-meteor-chat/Meteor` which doesn't seem to correspond with the `web.xml` file which is set up for just `/Meteor`.  So I changed line 3 of `application.js` to:

    url: '/Meteor',

Now I get the stack trace show below [bottom].

To enable someone to easily reproduce, debug, help.  I have posted this mini-project on github here:
   
    https://github.com/sroebuck/scala-meteor-chat

Please help - I have now spent two whole weeks just trying to get atmosphere to run!



> jetty-run
[info] jetty-7.3.1.v20110307
[info] NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
[info] started o.e.j.w.WebAppContext{/,file:/Users/sroebuck/Dropbox/Projects/scala-meteor-chat/target/webapp/},/Users/sroebuck/Dropbox/Projects/scala-meteor-chat/target/webapp
16:50:53.650 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - initializing atmosphere framework: 0.8-SNAPSHOT
16:50:53.658 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - using default broadcaster class: class org.atmosphere.cpr.DefaultBroadcaster
16:50:53.680 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - Atmosphere is using comet support: org.atmosphere.container.Servlet30Support running under container: jetty/7.3.1.v20110307 using javax.servlet/3.0
16:50:53.680 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - using broadcaster class: org.atmosphere.cpr.DefaultBroadcaster
16:50:53.684 [main] INFO  o.a.h.ReflectorServletProcessor - Installing Servlet org.atmosphere.samples.chat.MeteorChat
16:50:53.684 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - started atmosphere framework: 0.8-SNAPSHOT
[info] Started [hidden email]
> 16:51:00.394 [qtp302043267-61 - /Meteor?0] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [GET /Meteor?0]@1393180668 org.eclipse.jetty.server.Request@530a3ffc
 HttpServletResponse: HTTP/1.1 200


16:51:00.409 [qtp302043267-61 - /Meteor?0] INFO  o.a.commons.util.EventsLogger - onSuspend(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=null, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
16:51:00.416 [qtp302043267-61 - /Meteor?0] DEBUG o.a.container.Servlet30Support - Suspending response: HTTP/1.1 200
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie: JSESSIONID=1qgkjq7ku165d16wro6xydooql;Path=/
Expires: -1
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Access-Control-Allow-Origin: *


16:51:00.416 [Atmosphere-AsyncWrite-0] INFO  o.a.commons.util.EventsLogger - onBroadcast(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=<script type='text/javascript'>
window.parent.app.update({ name: "localhost", message: "has suspended a connection from 0:0:0:0:0:0:0:1%0" });
</script>
, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
[warn] Error for /Meteor
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.isAsyncStarted()Z
    at org.atmosphere.container.Servlet30Support.suspend(Servlet30Support.java:136)
    at org.atmosphere.container.Servlet30Support.service(Servlet30Support.java:91)
    at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1182)
    at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1164)
    at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1150)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.eclipse.jetty.websocket.WebSocketServlet.service(WebSocketServlet.java:86)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)
16:51:38.895 [qtp302043267-58 - /Meteor] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [POST /Meteor]@1550100593 org.eclipse.jetty.server.Request@5c64a871
 HttpServletResponse: HTTP/1.1 200


16:51:38.898 [Atmosphere-AsyncWrite-1] INFO  o.a.commons.util.EventsLogger - onBroadcast(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=<script type='text/javascript'>
window.parent.app.update({ name: "System Message from localhost", message: "Stuart has joined." });
</script>
, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
16:51:38.909 [Atmosphere-AsyncWrite-1] DEBUG o.atmosphere.cpr.DefaultBroadcaster - onException()
org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException
    at org.eclipse.jetty.io.UncheckedPrintWriter.setError(UncheckedPrintWriter.java:107) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:280) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:295) ~[na:na]
    at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:112) ~[atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:558) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:504) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_26]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_26]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_26]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_26]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_26]
    at java.lang.Thread.run(Thread.java:680) [na:1.6.0_26]
Caused by: org.eclipse.jetty.io.EofException: null
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:149) ~[na:na]
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:96) ~[na:na]
    at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:109) ~[na:1.6.0_26]
    at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:283) ~[na:na]
    at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:107) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:271) ~[na:na]
    ... 11 common frames omitted
16:51:38.910 [Atmosphere-AsyncWrite-1] INFO  o.a.commons.util.EventsLogger - onDisconnect(): AtmosphereResourceEventImpl{isCancelled=true, isResumedOnTimeout=false, message=null, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException}
Exception in thread "Atmosphere-AsyncWrite-2" java.lang.IllegalStateException: No SessionManager
    at org.eclipse.jetty.server.Request.getSession(Request.java:1107)
    at org.eclipse.jetty.server.Request.getSession(Request.java:1097)
    at org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:168)
    at org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:63)
    at org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:179)
    at org.atmosphere.cpr.DefaultBroadcaster$4.run(DefaultBroadcaster.java:589)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
16:51:44.577 [qtp302043267-61 - /Meteor] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [POST /Meteor]@1550100593 org.eclipse.jetty.server.Request@5c64a871
 HttpServletResponse: HTTP/1.1 200



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Atmosphere - please work for me!

Stuart Roebuck
Thanks for the feedback and suggestions from various sources.

The error message:
HttpServletRequest.isAsyncStarted appears to be resolved most simply by using the "javax.servlet" include rather than the "geronimo-servlet_3.0_spec".  There is also a sensitivity around Jetty versions and I have currently plumped for "7.4.5.v20110725" which appears to be the current "7.4.5" release.

I've updated https://github.com/sroebuck/scala-meteor-chat with the current state of things.

I'll re-try using jetty outside of sbt which may be equivalent to the issue of using jetty in maven.  At present I'm not getting websocket transport, just comet.

Stuart.

--

Stuart Roebuck, Director
ProInnovate Limited <http://www.proinnovate.com/>
Mobile: +44 (0)7980 914878





[hidden email]
5 September 2011 8:17am

[hidden email]
2 September 2011 5:08pm


I've given up trying to get atmosphere to work in my Scalatra project (previously using socket-io happily until something changed recently and they decided to support Atmosphere moving forward).

So I decided to go to first principles.

I've downloaded the meteor-chat sample from the github repository and I've simply modified the build so that it uses sbt and loads in jetty to run under (and excludes atmosphere-ping because I've got ping overload!)

I run it in sbt with "jetty-run" and bring up my browser and show "http://localhost:8080/".

It successfully displays the "Glassfish Chat" window and allows me to login with my name.  My name is then displayed and it invites me to chat.  However, when I chat it does absolutely nothing else on screen when I submit the chat text with the submit button.

So I looked at the code and I noticed that the console was displayed a 404 error trying to access `/atmosphere-meteor-chat/Meteor` which doesn't seem to correspond with the `web.xml` file which is set up for just `/Meteor`.  So I changed line 3 of `application.js` to:

    url: '/Meteor',

Now I get the stack trace show below [bottom].

To enable someone to easily reproduce, debug, help.  I have posted this mini-project on github here:
   
    https://github.com/sroebuck/scala-meteor-chat

Please help - I have now spent two whole weeks just trying to get atmosphere to run!



> jetty-run
[info] jetty-7.3.1.v20110307
[info] NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
[info] started o.e.j.w.WebAppContext{/,file:/Users/sroebuck/Dropbox/Projects/scala-meteor-chat/target/webapp/},/Users/sroebuck/Dropbox/Projects/scala-meteor-chat/target/webapp
16:50:53.650 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - initializing atmosphere framework: 0.8-SNAPSHOT
16:50:53.658 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - using default broadcaster class: class org.atmosphere.cpr.DefaultBroadcaster
16:50:53.680 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - Atmosphere is using comet support: org.atmosphere.container.Servlet30Support running under container: jetty/7.3.1.v20110307 using javax.servlet/3.0
16:50:53.680 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - using broadcaster class: org.atmosphere.cpr.DefaultBroadcaster
16:50:53.684 [main] INFO  o.a.h.ReflectorServletProcessor - Installing Servlet org.atmosphere.samples.chat.MeteorChat
16:50:53.684 [main] INFO  org.atmosphere.cpr.AtmosphereServlet - started atmosphere framework: 0.8-SNAPSHOT
[info] Started [hidden email]
> 16:51:00.394 [qtp302043267-61 - /Meteor?0] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [GET /Meteor?0]@1393180668 org.eclipse.jetty.server.Request@530a3ffc
 HttpServletResponse: HTTP/1.1 200


16:51:00.409 [qtp302043267-61 - /Meteor?0] INFO  o.a.commons.util.EventsLogger - onSuspend(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=null, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
16:51:00.416 [qtp302043267-61 - /Meteor?0] DEBUG o.a.container.Servlet30Support - Suspending response: HTTP/1.1 200
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie: JSESSIONID=1qgkjq7ku165d16wro6xydooql;Path=/
Expires: -1
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Access-Control-Allow-Origin: *


16:51:00.416 [Atmosphere-AsyncWrite-0] INFO  o.a.commons.util.EventsLogger - onBroadcast(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=<script type='text/javascript'>
window.parent.app.update({ name: "localhost", message: "has suspended a connection from 0:0:0:0:0:0:0:1%0" });
</script>
, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
[warn] Error for /Meteor
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.isAsyncStarted()Z
    at org.atmosphere.container.Servlet30Support.suspend(Servlet30Support.java:136)
    at org.atmosphere.container.Servlet30Support.service(Servlet30Support.java:91)
    at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1182)
    at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1164)
    at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1150)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.eclipse.jetty.websocket.WebSocketServlet.service(WebSocketServlet.java:86)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)
16:51:38.895 [qtp302043267-58 - /Meteor] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [POST /Meteor]@1550100593 org.eclipse.jetty.server.Request@5c64a871
 HttpServletResponse: HTTP/1.1 200


16:51:38.898 [Atmosphere-AsyncWrite-1] INFO  o.a.commons.util.EventsLogger - onBroadcast(): AtmosphereResourceEventImpl{isCancelled=false, isResumedOnTimeout=false, message=<script type='text/javascript'>
window.parent.app.update({ name: "System Message from localhost", message: "Stuart has joined." });
</script>
, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=null}
16:51:38.909 [Atmosphere-AsyncWrite-1] DEBUG o.atmosphere.cpr.DefaultBroadcaster - onException()
org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException
    at org.eclipse.jetty.io.UncheckedPrintWriter.setError(UncheckedPrintWriter.java:107) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:280) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:295) ~[na:na]
    at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:112) ~[atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:558) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:504) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_26]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_26]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_26]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_26]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_26]
    at java.lang.Thread.run(Thread.java:680) [na:1.6.0_26]
Caused by: org.eclipse.jetty.io.EofException: null
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:149) ~[na:na]
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:96) ~[na:na]
    at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:109) ~[na:1.6.0_26]
    at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:283) ~[na:na]
    at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:107) ~[na:na]
    at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:271) ~[na:na]
    ... 11 common frames omitted
16:51:38.910 [Atmosphere-AsyncWrite-1] INFO  o.a.commons.util.EventsLogger - onDisconnect(): AtmosphereResourceEventImpl{isCancelled=true, isResumedOnTimeout=false, message=null, resource=AtmosphereResourceImpl{, action=org.atmosphere.cpr.AtmosphereServlet$Action@35cd9e66, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, cometSupport=org.atmosphere.container.Servlet30Support@4e5a5622, serializer=null, isInScope=true, useWriter=true, listeners=[org.atmosphere.commons.util.EventsLogger@cccfa5e]}, throwable=org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException}
Exception in thread "Atmosphere-AsyncWrite-2" java.lang.IllegalStateException: No SessionManager
    at org.eclipse.jetty.server.Request.getSession(Request.java:1107)
    at org.eclipse.jetty.server.Request.getSession(Request.java:1097)
    at org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:168)
    at org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:63)
    at org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:179)
    at org.atmosphere.cpr.DefaultBroadcaster$4.run(DefaultBroadcaster.java:589)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
16:51:44.577 [qtp302043267-61 - /Meteor] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
 HttpServletRequest: [POST /Meteor]@1550100593 org.eclipse.jetty.server.Request@5c64a871
 HttpServletResponse: HTTP/1.1 200



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Atmosphere - please work for me!

Oleg
In reply to this post by java.net
Hi Stuart,

WebSocket communication works fine with Atmosphere 0.8-SNAPSHOT and Jetty 8.0.0.M2 or 8.0.0.M3. Can you not update your Jetty server?

Cheers. Oleg.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Atmosphere - please work for me!

stuart.roebuck
Oleg,

I've tried with 8.0.0.M3 and I appear to get fundamentally the same results as with 8.0.0.v20110901 or even 7.4.5.v20110725.

It is, however, clear that Atmosphere 0.8-SNAPSHOT changes things in terms of Websocket support as 0.7.2 fails at the point of negotiating the transport whereas 0.8-SNAPSHOT seems to think it's working.  It just doesn't seem to work! :)

I have a small stand-alone example of my problems here: <https://github.com/sroebuck/scala-meteor-chat>


It has a fairly comprehensive README with it, but basically it has a single JavaScript file which utilises the atmosphere jQuery plugin to connect to a single Scala based Servlet.   Running under Firefox 6 (which drops down to streaming) it works absolutely fine.  But under Webkit (Safari / Chrome) it appears as though the server is not receiving pushed data, and the client does not appear to fire callbacks after the push.

It may be that there is something I am missing, but, as I understand Meteor requires little if any configuration and should allow the code to operate, to a large degree, ignorant of websockets.

Stuart.


Oleg wrote:
Hi Stuart,

WebSocket communication works fine with Atmosphere 0.8-SNAPSHOT and Jetty
8.0.0.M2 or 8.0.0.M3. Can you not update your Jetty server?

Cheers. Oleg.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[[atmosphere-users]] Re: Atmosphere - please work for me!

Jeanfrancois Arcand-4
Salut,

agree. I will take a look, as so far all the sample on websocket I've used works with Jetty 7.3 and 8.0 M2 and up.

Looking...

-- Jeanfrancois

On 11-09-06 3:21 PM, Stuart Roebuck wrote:
Oleg,

I've tried with 8.0.0.M3 and I appear to get fundamentally the same results as with 8.0.0.v20110901 or even 7.4.5.v20110725.

It is, however, clear that Atmosphere 0.8-SNAPSHOT changes things in terms of Websocket support as 0.7.2 fails at the point of negotiating the transport whereas 0.8-SNAPSHOT seems to think it's working.  It just doesn't seem to work! :)

I have a small stand-alone example of my problems here: <https://github.com/sroebuck/scala-meteor-chat>


It has a fairly comprehensive README with it, but basically it has a single JavaScript file which utilises the atmosphere jQuery plugin to connect to a single Scala based Servlet.   Running under Firefox 6 (which drops down to streaming) it works absolutely fine.  But under Webkit (Safari / Chrome) it appears as though the server is not receiving pushed data, and the client does not appear to fire callbacks after the push.

It may be that there is something I am missing, but, as I understand Meteor requires little if any configuration and should allow the code to operate, to a large degree, ignorant of websockets.

Stuart.


Oleg wrote:
Hi Stuart,

WebSocket communication works fine with Atmosphere 0.8-SNAPSHOT and Jetty
8.0.0.M2 or 8.0.0.M3. Can you not update your Jetty server?

Cheers. Oleg.
Loading...