Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atmosphere 0.8.3 and bug in sample samples\jquery-pubsub\ #153

Closed
xserge opened this issue Jan 18, 2012 · 2 comments
Closed

Atmosphere 0.8.3 and bug in sample samples\jquery-pubsub\ #153

xserge opened this issue Jan 18, 2012 · 2 comments

Comments

@xserge
Copy link

xserge commented Jan 18, 2012

Hello Everybody.
I just installed atmosphere 0.8.3, and have same questions to run-time functionality of sample application samples\jquery-pubsub
Project that I’m implementing will use similar functionality that has this sample that’s why I’m asking
Below the test case for Firefox.

  1. Deploy this sample on web server apache-tomcat-7.0.23
  2. open url http://localhost:8080/atmosphere-jquery-pubsub/ on NEW !!! instance of Firefox 9.0.1 or 8…
  3. enter topic to subscribe test1
  4. choose transport protocol “http streaming”
  5. Publish message “Message 1”
  6. Nothing is shown below text “Real Time PubSub Update”
  7. Change transport protocol to “long pooling”, press button “Switch transport”
  8. Publish message “Message 2”
  9. Appeared response “Message Received: message 2 sent trying to use long-polling but detected transport is long-polling” below text “Real Time PubSub Update”
  10. change transport protocol to “http streaming”, press button “Switch transport”
  11. Publish message “Message 3”
  12. Appeared new response “Message Received: message 3 sent trying to use streaming but detected transport is streaming”
    My question is why nothing was responsed on step 6 however on step 12 this protocol works fine ?

When I’m trying to open this application on Opera 11.60 after step 4 I’m receiving very long text text in browser started from.

Message Received: <!-- --------------------------------------------------------------------------------------
And so on…
But after next steps as described above I’m receiving
Message Received: gmessage 3 sent trying to use streaming but detected transport is streaming
Message Received: message 3 sent trying to use streamin but detected transport is streaming
Message Received: message 2 sent trying to use long-polling but detected transport is long-polling
Message Received: message 2 sent trying to use long-polling but detected transport is long-polling
Message Received: message 2 sent trying to use long-polling but detected transport is long-polling
As you see message 2 duplicated 3 times and message 3 twice with leading character “g”
Please help sort out the problems

@xserge
Copy link
Author

xserge commented Jan 20, 2012

Test cases for Chrome and IE below.

Test case for Chrome 16.0.912.75 m.

  1. Deploy this sample on web server apache-tomcat-7.0.23
  2. open url http://localhost:8080/atmosphere-jquery-pubsub/ on NEW !!! instance of Chrome 16…
  3. enter topic to subscribe test1
  4. choose transport protocol “http streaming”, a lot of similar messages appears in console:

12:05:01.361 [http-nio-8080-exec-7] DEBUG o.atmosphere.jersey.AtmosphereFilter - Linked HttpServletRequest org.apache.ca
talina.connector.RequestFacade@147e668d with ContainerResponse com.sun.jersey.spi.container.ContainerResponse@373727fe
12:05:01.363 [http-nio-8080-exec-7] INFO o.a.samples.pubsub.EventsLogger - onSuspend(): 127.0.0.1:61177
12:05:01.363 [http-nio-8080-exec-7] DEBUG o.a.container.Tomcat7CometSupport - Suspending response: org.apache.catalina.c
onnector.ResponseFacade@741ad263
...

  1. Publish message “Message 1”

exceptions appears in console, message doesn't send:

12:05:13.300 [Atmosphere-AsyncWrite-0] INFO o.a.samples.pubsub.EventsLogger - onDisconnect(): null:-1
12:05:13.300 [Atmosphere-AsyncWrite-0] ERROR o.atmosphere.cpr.DefaultBroadcaster - Invalid AtmosphereResource state Atmo
sphereResourceEventImpl{isCancelled=false,
isResumedOnTimeout=false,
throwable=null,
message=m1 sent trying to use streaming,
resource=AtmosphereResourceImpl{, hasCode661553709,
action=org.atmosphere.cpr.AtmosphereServlet$Action@5b606e1f,
broadcaster=org.atmosphere.jersey.JerseyBroadcaster,
cometSupport=org.atmosphere.container.Tomcat7CometSupport@20579615,
serializer=null,
isInScope=true,
useWriter=true,
listeners=[org.atmosphere.samples.pubsub.EventsLogger@17dde417]}}
12:05:13.306 [Atmosphere-AsyncWrite-0] ERROR o.atmosphere.cpr.DefaultBroadcaster - If you are using Tomcat 7.0.22 and lo
wer, your most probably hitting http://is.gd/NqicFT
12:05:13.307 [Atmosphere-AsyncWrite-0] ERROR o.atmosphere.cpr.DefaultBroadcaster -
java.lang.NullPointerException: null
at org.apache.catalina.connector.Request.notifyAttributeAssigned(Request.java:1553) ~[catalina.jar:7.0.23]
at org.apache.catalina.connector.Request.setAttribute(Request.java:1544) ~[catalina.jar:7.0.23]
at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:541) ~[catalina.jar:7.0.23]
at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:694) ~[atmosphere-runtime-0.8
.4.jar:0.8.4]
at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:747) [atmosphere-runtime-0.8.4.jar:0.8.4]

    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_25]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_25]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_25]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_25]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_25]
    at java.lang.Thread.run(Thread.java:662) [na:1.6.0_25]
  1. Nothing is shown below text “Real Time PubSub Update”
  2. Change transport protocol to “long pooling”, press button “Switch transport”
  3. Publish message “Message 2”
  4. Appeared response “Message Received: message 2 sent trying to use long-polling but detected transport is long-polling” below text “Real Time PubSub Update”
  5. change transport protocol to “http streaming”, press button “Switch transport”
  6. Publish message “Message 3”
  7. Appeared new response “Message Received: message 3 sent trying to use streaming but detected transport is streaming”

Test case for IE9

  1. Deploy this sample on web server apache-tomcat-7.0.23
  2. open url http://localhost:8080/atmosphere-jquery-pubsub/ on NEW !!! instance of IE9…
  3. enter topic to subscribe test1
  4. choose transport protocol “http streaming”
  5. Publish message “Message 1”

13:14:26.110 [Atmosphere-AsyncWrite-0] ERROR o.atmosphere.cpr.DefaultBroadcaster - Invalid AtmosphereResource state Atmo
sphereResourceEventImpl{isCancelled=false,
isResumedOnTimeout=false,
throwable=null,
message=message1 sent using streaming,
resource=AtmosphereResourceImpl{, hasCode280724144,
action=org.atmosphere.cpr.AtmosphereServlet$Action@2bc5cd05,
broadcaster=org.atmosphere.jersey.JerseyBroadcaster,
cometSupport=org.atmosphere.container.Tomcat7CometSupport@20579615,
serializer=null,
isInScope=true,
useWriter=true,
listeners=[org.atmosphere.samples.pubsub.EventsLogger@471719b6]}}
13:14:26.113 [Atmosphere-AsyncWrite-0] ERROR o.atmosphere.cpr.DefaultBroadcaster - If you are using Tomcat 7.0.22 and lo
wer, your most probably hitting http://is.gd/NqicFT
13:14:26.115 [Atmosphere-AsyncWrite-0] ERROR o.atmosphere.cpr.DefaultBroadcaster -
java.lang.NullPointerException: null
at org.apache.catalina.connector.Request.notifyAttributeAssigned(Request.java:1553) ~[catalina.jar:7.0.23]
at org.apache.catalina.connector.Request.setAttribute(Request.java:1544) ~[catalina.jar:7.0.23]
at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:541) ~[catalina.jar:7.0.23]
at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:694) ~[atmosphere-runtime-0.8
.4.jar:0.8.4]
at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:747) [atmosphere-runtime-0.8.4.jar:0.8.4]

    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_25]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_25]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_25]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_25]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_25]
    at java.lang.Thread.run(Thread.java:662) [na:1.6.0_25]

13:14:26.118 [Atmosphere-AsyncWrite-0] INFO o.a.samples.pubsub.EventsLogger - onDisconnect(): null:-1

  1. Nothing is shown below text “Real Time PubSub Update”
  2. Change transport protocol to “long pooling”, press button “Switch transport”
  3. Publish message “Message 2”
  4. Appeared response “Message Received: message 2 sent trying to use long-polling but detected transport is long-polling” below text “Real Time PubSub Update”
  5. change transport protocol to “http streaming”, press button “Switch transport”
  6. Publish message “Message 3”
  7. Appeared new response “Message Received: message 3 sent trying to use streaming but detected transport is streaming”

My question is Why http streaming doesn't work but works only after I use long pooling at first step and after that I use http streaming ?

@jfarcand
Copy link
Member

jfarcand commented Mar 1, 2012

I'm unable to reproduce that issue with Atmosphere 0.8.6. Closing

@jfarcand jfarcand closed this as completed Mar 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants