users@grizzly.java.net

RE: BayeuxCometHandler not to be casted to CometHandler?

From: Baechinger, Marc <bae_at_zuehlke.com>
Date: Fri, 23 Jan 2009 13:37:15 +0100

Dear Jeanfrancois

> apology for the delay...lllloong day at Sun (riff :-()

Many thanks for your response. You don't have to apologize. That's great.

> I think it could be a classloader issues with OSGI. Can you file an issue here:
> and attach your test case?

Ok. I've done this. The testcase is a netbeans webproject which could be build and deployed. Callin index.jsp causes the exception


> Where is your implementation class located?
> Inside grizzly-optionals?

No, not inside the grizzly-optionals. The servlet is part of a war file which is deployed.


Thanks for your engagement in Grizzly in general and for your help provided in my particular case. Very nice pice of software.


Kind regards
marc



P.S. Aktuelle Veranstaltungen: www.zuehlke.com/events

____________________________________
Consulting · Development · Integration

Marc Baechinger
Software Architekt

Zühlke Engineering AG
Wiesenstrasse 10a
8952 Schlieren (Zürich)
Schweiz

Phone +41 44 733 6611
Direct +41 44 733 6554
Mobile +41 79 778 80 52
Fax +41 44 733 6612
Marc.Baechinger_at_zuehlke.com
____________________________________

This e-mail is for the addressees only. The information it contains is confidential
and may be legally privileged. If you are not an addressee you must not distribute,
copy, disclose, use or rely on this e-mail or its contents and you must immediately
notify the sender you are in receipt of this e-mail and delete all copies from your
system. Any unauthorised use may be unlawful.



-----Original Message-----
From: Jeanfrancois.Arcand_at_Sun.COM [mailto:Jeanfrancois.Arcand_at_Sun.COM]
Sent: Freitag, 23. Januar 2009 02:21
To: users_at_grizzly.dev.java.net
Subject: Re: BayeuxCometHandler not to be casted to CometHandler?

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.getCometHa
> ndler(CometContext.java:95)
> at
> com.sun.enterprise.web.connector.grizzly.comet.CometContext.notify(Com
> etContext.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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
For additional commands, e-mail: users-help_at_grizzly.dev.java.net