Hi,

I'm trying to use wicketstuff-push in my project. I'm always getting a
ClassCastException in the wicketstuff-push sources, which I can't explain:

java.lang.ClassCastException:
org.mortbay.cometd.continuation.ContinuationBayeux cannot be cast to
org.cometd.Bayeux
     at
org.wicketstuff.push.cometd.CometdService.initBayeux(CometdService.java:172)
     at
org.wicketstuff.push.cometd.CometdService.getBayeux(CometdService.java:161)
     at
org.wicketstuff.push.cometd.CometdService.publish(CometdService.java:155)
     at org.xtoto.ui.comment.CommentPanel$3.onSubmit(CommentPanel.java:140)

My code is very similar to the example:

final ChannelEvent event = new ChannelEvent("chat");
event.addData("message", comment.getMessage());
getChannelService().publish(event); // -> Line 140 in CommentPanel

I'm using the trunk of wicketstuff. The org.wicketstuff.push code
compiled perfectly.

I tried different library versions - which didn't help.

Currently I'm using

cometd-api-1.1.1
cometd-client-6.1.22
cometd-server-6.1.22

jetty-6.1.22

wicket-1.4.7

When I change the code in push a little bit, from

_bayeux = (Bayeux) _application
        .getServletContext()
        .getAttribute(Bayeux.ATTRIBUTE); // -> line 172 in CometdService

to

ContinuationBayeux b = (ContinuationBayeux)_application
        .getServletContext()
        .getAttribute(Bayeux.ATTRIBUTE);

_bayeux = b;

I get a IncompatibleClassChangeError later in line:

serviceClient = _bayeux.newClient(BAYEUX_CLIENT_PREFIX);



Very strange...

Has anyone had this problem before? Any ideas?

Regards
Ingo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to