Broadcaster ID already assigned to SCOPE.REQUEST. Cannot change the id

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

Broadcaster ID already assigned to SCOPE.REQUEST. Cannot change the id

tmkha
I am constantly getting the following exception.  I am on version 0.7.2:

[http-bio-8080-exec-12] ERROR org.atmosphere.jersey.AtmosphereFilter  - failed to instantiate broadcaster with factory: org.atmosphere.cpr.DefaultBroadcasterFactory@78f7821d
java.lang.IllegalStateException: Broadcaster ID already assigned to SCOPE.REQUEST. Cannot change the id
        at org.atmosphere.cpr.DefaultBroadcaster.setID(DefaultBroadcaster.java:212)
        at org.atmosphere.jersey.AtmosphereFilter$Filter.suspend(AtmosphereFilter.java:470)
        at org.atmosphere.jersey.AtmosphereFilter$Filter.filter(AtmosphereFilter.java:244)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1412)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1345)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1335)
        at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:155)
        at org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:116)
        at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:294)
        at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:152)
        at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:191)
        at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:142)
        at org.atmosphere.container.Servlet30Support.service(Servlet30Support.java:87)
        at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1156)
        at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1138)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        ...
Looking at the code, this seems this only happen if the Broadcaster has be re-used or the generated ID is clashing.

I have set the following init-param:
        <init-param>
            <param-name>org.atmosphere.cpr.broadcasterLifeCyclePolicy</param-name> 
            <param-value>EMPTY_DESTROY</param-value>
        </init-param>

and I am using Suspend scope=Suspend.SCOPE.REQUEST.

No sure if it is related, but I also see a few occurrences of the following exception:

java.lang.IllegalStateException: This Broadcaster has been destroyed and cannot be used
        at org.atmosphere.cpr.DefaultBroadcaster.removeAtmosphereResource(DefaultBroadcaster.java:741)
        at org.atmosphere.cpr.DefaultBroadcasterFactory.removeAllAtmosphereResource(DefaultBroadcasterFactory.java:204)
        at org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:167)
        at org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadcasterUtil.java:74)
        at org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.java:66)
        at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:500)
        at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:519)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        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)

Any idea what could have cause this problem?

Thanks,

Triet
Loading...