I was trying get the latest comet changes to work with my version of "yet another simple comet chat example".
However the first call to a restful actor results in this:
FAT [20100104-18:18:26.099] application: java.lang.ClassCastException: se.scalablesolutions.akka.comet.AkkaServlet$$anon$1$$anon$2 cannot be cast to org.atmosphere.handler.ReflectorServletProcessor
FAT [20100104-18:18:26.099] application: at org.atmosphere.jersey.AtmosphereFilter$Filter.filter(AtmosphereFilter.java:231)
FAT [20100104-18:18:26.099] application: at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1008)
FAT [20100104-18:18:26.099] application: at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:941)
FAT [20100104-18:18:26.099] application: at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:932)
FAT [20100104-18:18:26.099] application: at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:384)
FAT [20100104-18:18:26.099] application: at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:451)
FAT [20100104-18:18:26.099] application: at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:632)
--> FAT [20100104-18:18:26.099] application: at se.scalablesolutions.akka.comet.AkkaServlet$$anon$1$$anon$2.onRequest(AkkaServlet.scala:34)
FAT [20100104-18:18:26.099] application: at se.scalablesolutions.akka.comet.AkkaServlet$$anon$1.onRequest(AkkaServlet.scala:44)
FAT [20100104-18:18:26.099] application: at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:144)
FAT [20100104-18:18:26.099] application: at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:117)
FAT [20100104-18:18:26.099] application: at org.atmosphere.container.JettyCometSupport.service(JettyCometSupport.java:79)
The problem seems to be this piece of code in se.scalablesolutions.akka.comet.AkkaServlet:
-----------------------------------------------------------------------------------
private val handler = new AbstractReflectorAtmosphereHandler {
override def onRequest(event: AtmosphereResource[HttpServletRequest, HttpServletResponse]) {
if (event ne null) {
event.getRequest.setAttribute(ReflectorServletProcessor.ATMOSPHERE_RESOURCE, event)
event.getRequest.setAttribute(ReflectorServletProcessor.ATMOSPHERE_HANDLER, this)
service(event.getRequest, event.getResponse)
}
}
}
-----------------------------------------------------------------------------------
The problem goes away if I replace AbstractReflectorAtmosphereHandler with ReflectorServletProcessor,
which seems to be ok after reading the athmosphere docs.
But is it?
Viktor, can you shed some light on this?
Thanks,
Eckart
I've fixed that issue this morning and now you no longer needs to change
anything (it should just works). Just download the latest Atmosphere
SNAPSHOT jars.
Note that for Akka 0.6 I can cut a special version of Atmosphere so we
don't rely on snapshot (same for Jersey).
A+
-- Jeanfrancois
>
> Viktor, can you shed some light on this?
>
> Thanks,
>
> Eckart
>
>
>
>
>
>
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Akka User List" group.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
>
>
>
If you could cut a special release it would be great. Please do it
ASAP if you can. You can email me or Viktor directly.
Thanks again.
----
Jonas Bonér
twitter: @jboner
blog: http://jonasboner.com
work: http://scalablesolutions.se
code: http://github.com/jboner
code: http://akkasource.org
also: http://letitcrash.com
On Jan 4, 2010, at 18:50, Jeanfrancois Arcand <jfarca...@gmail.com>
wrote:
And I did just work.
Thank you for the fast response (and even faster fix),
Eckart
Am Montag, 4. Januar 2010 18:50:33 schrieb Jeanfrancois Arcand:
> Salut,
>
> >
> > [snip]
> > But is it?And I did just work.
>
> I've fixed that issue this morning and now you no longer needs to change
> anything (it should just works). Just download the latest Atmosphere
> SNAPSHOT jars.
>
Thank you for the fast response (and even faster fix),
Eckart
> Note that for Akka 0.6 I can cut a special version of Atmosphere so we
> don't rely on snapshot (same for Jersey).
>
> A+
>
> -- Jeanfrancois
>
> >
> > Viktor, can you shed some light on this?
> >
> > Thanks,
> >
> > Eckart
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups "Akka User List" group.
> > To post to this group, send email to akka...@googlegroups.com.
> > To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
> > For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
> >
> >
> >
>
> --
>
> You received this message because you are subscribed to the Google Groups "Akka User List" group.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
>
>
>
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
well, now the exception is not thrown but the suspended get is not resumed either.
... and the list of messages is strangely serialized into JSON by se.scalablesolutions.akka.serialization.Serializer like this:
------------- mvn scala:console output ------------------
scala> new String(Serializer.ScalaJSON.out(List("2","3")))
new String(Serializer.ScalaJSON.out(List("2","3")))
res1: java.lang.String =
��w
["2", "3"]
---------------------------------------------------------
> Are you running Akka as kernel or in a container?
>
embedded in a jetty
> >
> > Eckart
> >
> > > Note that for Akka 0.6 I can cut a special version of Atmosphere so we
> > > don't rely on snapshot (same for Jersey).
> > >
> > > A+
> > >
> > > -- Jeanfrancois
> > >
> > > >
> > > > Viktor, can you shed some light on this?
> > > >
> > > > Thanks,
> > > >
> > > > Eckart
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > You received this message because you are subscribed to the Google
> > Groups "Akka User List" group.
> > > > To post to this group, send email to akka...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > akka-user+...@googlegroups.com<akka-user%2Bunsu...@googlegroups.com>
> > .
> > > > For more options, visit this group at
> > http://groups.google.com/group/akka-user?hl=en.
> > > >
> > > >
> > > >
> > >
> > > --
> > >
> > > You received this message because you are subscribed to the Google Groups
> > "Akka User List" group.
> > > To post to this group, send email to akka...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > akka-user+...@googlegroups.com<akka-user%2Bunsu...@googlegroups.com>
> > .
> > > For more options, visit this group at
> > http://groups.google.com/group/akka-user?hl=en.
> > >
> > >
> > >
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups
> > "Akka User List" group.
> > To post to this group, send email to akka...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > akka-user+...@googlegroups.com<akka-user%2Bunsu...@googlegroups.com>
Am Montag, 4. Januar 2010 20:34:41 schrieb Viktor Klang:
> On Mon, Jan 4, 2010 at 8:28 PM, Eckart Hertzler <eck...@hertzler.de> wrote:well, now the exception is not thrown but the suspended get is not resumed either.
>
> > Am Montag, 4. Januar 2010 18:50:33 schrieb Jeanfrancois Arcand:
> > > Salut,
> > >
> > > >
> > > > [snip]
> > > > But is it?
> > >
> > > I've fixed that issue this morning and now you no longer needs to change
> > > anything (it should just works). Just download the latest Atmosphere
> > > SNAPSHOT jars.
> > >
> >
> > And I did just work.
> >
> > Thank you for the fast response (and even faster fix),
> >
>
> Eckart, does your Comet sample work now?
... and the list of messages is strangely serialized into JSON by se.scalablesolutions.akka.serialization.Serializer like this:
------------- mvn scala:console output ------------------
scala> new String(Serializer.ScalaJSON.out(List("2","3")))
new String(Serializer.ScalaJSON.out(List("2","3")))
res1: java.lang.String =
��w
["2", "3"]
---------------------------------------------------------
embedded in a jetty
> Are you running Akka as kernel or in a container?
>
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
then I will REST assured...
;-)
>
>
> >
> > > >
> > > > Eckart
> > > >
> > > > > Note that for Akka 0.6 I can cut a special version of Atmosphere so
> > we
> > > > > don't rely on snapshot (same for Jersey).
> > > > >
> > > > > A+
> > > > >
> > > > > -- Jeanfrancois
> > > > >
> > > > > >
> > > > > > Viktor, can you shed some light on this?
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Eckart
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > You received this message because you are subscribed to the Google
> > > > Groups "Akka User List" group.
> > > > > > To post to this group, send email to akka...@googlegroups.com.
> > > > > > To unsubscribe from this group, send email to
> > > > akka-user+...@googlegroups.com<akka-user%2Bunsu...@googlegroups.com>
> > <akka-user%2Bunsu...@googlegroups.com<akka-user%252Buns...@googlegroups.com>
> > >
> > > > .
> > > > > > For more options, visit this group at
> > > > http://groups.google.com/group/akka-user?hl=en.
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > >
> > > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Akka User List" group.
> > > > > To post to this group, send email to akka...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > > > akka-user+...@googlegroups.com<akka-user%2Bunsu...@googlegroups.com>
> > <akka-user%2Bunsu...@googlegroups.com<akka-user%252Buns...@googlegroups.com>
> > >
> > > > .
> > > > > For more options, visit this group at
> > > > http://groups.google.com/group/akka-user?hl=en.
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > >
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Akka User List" group.
> > > > To post to this group, send email to akka...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > akka-user+...@googlegroups.com<akka-user%2Bunsu...@googlegroups.com>
> > <akka-user%2Bunsu...@googlegroups.com<akka-user%252Buns...@googlegroups.com>
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
> "Grizzly-9998-WorkerThread(2)"
> org.atmosphere.util.BroadcasterLookup.lookup(BroadcasterLookup.java:65)
> org.atmosphere.jersey.AtmosphereProviders$BroadcasterProvider$1.fromString(AtmosphereProviders.java:76)
> com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderExtractor.extract(StringReaderExtractor.java:75)
> com.sun.jersey.server.impl.model.parameter.PathParamInjectableProvider$PathParamInjectable.getValue(PathParamInjectableProvider.java:74)
> com.sun.jersey.server.impl.inject.InjectableValuesProvider.getInjectableValues(InjectableValuesProvider.java:43)
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$EntityParamInInvoker.getParams(AbstractResourceMethodDispatchProvider.java:119)
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:147)
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:259)
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83)
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71)
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:990)
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:941)
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:932)
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:384)
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:451)
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:632)
> se.scalablesolutions.akka.comet.AkkaServlet$$anon$1$$anon$2.onRequest(AkkaServlet.scala:34)
> se.scalablesolutions.akka.comet.AkkaServlet$$anon$1.onRequest(AkkaServlet.scala:44)
> org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:144)
> org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:117)
> org.atmosphere.container.GrizzlyCometSupport.service(GrizzlyCometSupport.java:99)
> org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:772)
> org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:755)
> org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:742)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:195)
> com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:139)
> com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:376)
> com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:324)
> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
> com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:473)
> com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:341)
> com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:84)
> com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:161)
> com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:137)
> com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:88)
> com.sun.grizzly.http.TaskBase.run(TaskBase.java:189)
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
> java.lang.Thread.run(Thread.java:619)
The issue is with the AkkaServlet which *must* set the default
broadcaster to JerseyBroadcaster and not let Atmosphere use it's default
one. The fix is simple but I must admit the 404 was a tough one to debug
as I needed to look at Jersey code to understand the problem :-(
Anyway Viktor will commit a fix and I will tag once I get the OK :-)
A+
-- Jeanfrancois
A+
-- Jeanfrancois
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
----
Jonas Bonér
twitter: @jboner
blog: http://jonasboner.com
work: http://scalablesolutions.se
code: http://github.com/jboner
code: http://akkasource.org
also: http://letitcrash.com
On Jan 4, 2010, at 23:22, Jeanfrancois Arcand <jfarca...@gmail.com>
wrote:
> --
>
> You received this message because you are subscribed to the Google
> Groups "Akka User List" group.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to akka-user+...@googlegroups.com
Sweet. Awesome job guys. Thanks a lot JF for steering things up and
Viktor for your perseverance. Cutting 0.6 tomorrow morning.
----
Jonas Bonér
twitter: @jboner
blog: http://jonasboner.com
work: http://scalablesolutions.se
code: http://github.com/jboner
code: http://akkasource.org
also: http://letitcrash.com
On Jan 4, 2010, at 23:22, Jeanfrancois Arcand <jfarca...@gmail.com>
wrote:
> OK I've found the issue...Jersey wrongly report a 404 because it can't
> map the exception (I think there is an issue with Jersey as it should
> return a 500 instead...quite confusing to debug). The call stack is:
>
>
>> "Grizzly-9998-WorkerThread(2)"
>> org.atmosphere.util.BroadcasterLookup.lookup(BroadcasterLookup.java:
>> 65)
>> (AtmosphereServlet.java:772)
>> org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:
>> 755)
>> org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:
>> 742)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>> com.sun.grizzly.http.servlet.FilterChainImpl.doFilter
>> (FilterChainImpl.java:195)
>> com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain
>> (FilterChainImpl.java:139)
>> com.sun.grizzly.http.servlet.ServletAdapter.doService
>> (ServletAdapter.java:376)
>> com.sun.grizzly.http.servlet.ServletAdapter.service
>> (ServletAdapter.java:324)
>> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service
>> (GrizzlyAdapter.java:166)
>> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:
>> 791)
>> com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:
>> 473)
>> com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:341)
>> com.sun.grizzly.comet.CometAsyncFilter.doFilter
>> (CometAsyncFilter.java:84)
>> com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters
>> (DefaultAsyncExecutor.java:161)
>> com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt
>> (DefaultAsyncExecutor.java:137)
>> com.sun.grizzly.arp.AsyncProcessorTask.doTask
>> (AsyncProcessorTask.java:88)
>> com.sun.grizzly.http.TaskBase.run(TaskBase.java:189)
>> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork
>> (AbstractThreadPool.java:330)
>> com.sun.grizzly.util.AbstractThreadPool$Worker.run
>> (AbstractThreadPool.java:309)
>> java.lang.Thread.run(Thread.java:619)
>
> The issue is with the AkkaServlet which *must* set the default
> broadcaster to JerseyBroadcaster and not let Atmosphere use it's
> default
> one. The fix is simple but I must admit the 404 was a tough one to
> debug
> as I needed to look at Jersey code to understand the problem :-(
>
> Anyway Viktor will commit a fix and I will tag once I get the OK :-)
>
> A+
>
> -- Jeanfrancois
>
>
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "Akka User List" group.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to akka-user+...@googlegroups.com
On 04/01/10 5:52 PM, Jonas Bonér wrote:
> For the release tomorrow. Are we using special versions of Atmosphere
> and Jersey or how do we best handle this? Were you creating special
> releases JF?
yes, working on it. The artifact will be named:
[jersey|atmosphere-module-name]-version-[akka06].jar
atmosphere-runtime-0.5-akka06.jar
jersey-core-1.1.5-akka06.jar
Any better naming in mind?
A+
-- Jeanfrancois