Hi all,
I’m currently experimenting with Smack and FastPath and I noticed that with the latest Smack Library (3.0.4) the WorkgroupInvitation event is not fired. After some debugging I discoverd that the following error occurs in the Smack Library:
java.lang.ClassCastException:
org.jivesoftware.smack.packet.DefaultPacketExtension cannot be cast to
org.jivesoftware.smackx.workgroup.packet.SessionID at thalantyr.smack.workaround.Workgroup.handlePacket(Workgroup.java:591)
at thalantyr.smack.workaround.Workgroup.access$4(Workgroup.java:551)
at thalantyr.smack.workaround.Workgroup$3.processPacket(Workgroup.java:144)
at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader.java:819)
at org.jivesoftware.smack.PacketReader$ListenerNotification.run(PacketReader.java:799)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
The “thalantyr.smack.workaround.Workgroup” class is just a copy of the class as it appears in the Smack library with the following added at line 590 for debugging:
try {
sessionID = ((SessionID)pe).getSessionID();
} catch (Throwable t) {
t.printStackTrace();
}
According to the API docs (and from what I see in the sourcecode of Smack) the cast shouldn’t be a problem.
I checked my classpath for double libraries etc. but I can’t find anything of the sort.
Edit: I should probably mention that if I use the smack libraries (smack.jar, smackx.ajr and workgroup.jar) which are packaged with webchat.jar I have no problems whatsoever.