Salut,
apology for the delay...lllloong day at Sun (riff :-()
Marc Bächinger wrote:
> Hi
>
> I'm currently developing an application for which I would like to use
> the Bayeux protocol of Grizzly/Glassfish. I have the chat application of
> Carol McDonald working. So I can write message from one browser to the
> CometdDervlet which broadcast it to the other clients subscribed to that
> channel.
>
> Based on this I tried to implement my own CometdServlet for which I just
> copied the code out of the Glassfishh source code repository to start
> with. To my surprise the server throws an ClassCastException when the
> servlet is called:
>
> java.lang.ClassCastException: com.sun.grizzly.cometd.BayeuxCometHandler
> cannot be cast to
> com.sun.enterprise.web.connector.grizzly.comet.CometHandler
> at
> com.sun.enterprise.web.connector.grizzly.comet.CometContext.getCometHandler(CometContext.java:95)
> at
> com.sun.enterprise.web.connector.grizzly.comet.CometContext.notify(CometContext.java:150)
> at com.sun.grizzly.cometd.EventRouterImpl.route(EventRouterImpl.java:98)
> [...]
>
> That puzzles my because I checked out the BayeuxCometHandler source. It
> extends the BayeuxBaseHandler (or similar) which does implement the
> CometHandler interface. So I do not understand why there is a
> ClassCasrtException.
>
> Did someone of you guys have similar problems? Do I have a library mismatch?
>
> I'm using Glassfish V3 prelude. In the IDE I added the
> grizzly-optionals.jar linrary to make it compile.
I think it could be a classloader issues with OSGI. Can you file an
issue here:
https://grizzly.dev.java.net/issues/
and attach your test case? Where is your implementation class located?
Inside grizzly-optionals?
Thanks
-- jeanfrancois
>
> Any ideas?
>
> many thanks
> marc