users@grizzly.java.net

Re: GWT + Comet question (was Re: [Jean-Francois Arcand's Blog] New Comment Post

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 24 Feb 2009 21:20:05 -0500

Salut,

apology for the delay. I will take a look ASAP.

Thanks!

--Jeanfrancois

Jens Heyer wrote:
> Hello again,
>
>
>
> after posting my request this morning I have tried the example of Marco
> getting to work. I thought that the open issue completely prevents the
> execution but it seems as if this is not the case. Nevertheless I got
> another problem but sadly I don’t really know how to write a test case
> so I hope the following description may help you getting familiar with
> the problem I have got:
>
>
>
> 1. Download the “GrizzlyTest.war”
>
> 2. Deploy the application to your local GlassFish 2.1
>
> 3. Open a Browser and go to http://localhost:8080/GrizzlyTest
>
> 4. Then click “Get Message” - this works fine and as expected
> because it uses the ordinary GWT RPC functionality
>
> 5. Then click “Connect” - in the Firefox or Opera I get correct
> comet messages but sometimes an error message occurs or a message is
> missing. Taking a look at the server log shows me that stack trace:
>
>
>
> [#|2009-02-23T21:21:18.982+0100|WARNING|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=Thread-438;_RequestID=c149599e-e527-4295-a149-ca9e57baf2ae;|Notification
> failed:
>
> java.lang.ClassCastException: org.myapp.client.Message cannot be cast to
> org.myapp.client.Message
>
> at
> org.myapp.server.CometServiceImpl$GWTCometHandler.onEvent(CometServiceImpl.java:60)
>
> at
> com.sun.enterprise.web.connector.grizzly.comet.DefaultNotificationHandler.notify0(DefaultNotificationHandler.java:197)
>
> at
> com.sun.enterprise.web.connector.grizzly.comet.DefaultNotificationHandler.notify0(DefaultNotificationHandler.java:125)
>
> at
> com.sun.enterprise.web.connector.grizzly.comet.DefaultNotificationHandler.notify(DefaultNotificationHandler.java:108)
>
> at
> com.sun.enterprise.web.connector.grizzly.comet.CometContext.notify(CometContext.java:601)
>
> at
> com.sun.enterprise.web.connector.grizzly.comet.CometContext.notify(CometContext.java:512)
>
> at
> org.myapp.server.CometServiceImpl$SendAMessage.run(CometServiceImpl.java:40)
>
>
>
> When using the IE I only get one or two messages reaching the client.
>
>
>
> Can you help me solving that problem?
>
>
>
> Thank you in advance for your efforts and your cooperation.
>
>
>
> Jens
>