Muc.join problem in applet

I am trying to run the following lines of code on a working “connection”:

muc = new MultiUserChat(connection,"hoho@conference.jabber.org");

try (((

muc.join(“mynick”);

muc.sendMessage(“hi there”);

catch(XMPPException xmppe)(((

)))

System.out.println(“could not join room:”+xmppe.toString());

)))

The message gets sent, I can see that in another jabber client. However I get the following error message when “muc.join” is executed:

Java.lang.ClassCastException: org.jivesoftware.smack.packet.DefaultPacketExtension

at org.jivesoftware.smackx.muc.MultiUserChat.getMUCUserExtension(MultiUserChat.jav a:1955)

at org.jivesoftware.smackx.muc.MultiUserChat.access$600(MultiUserChat.java:46)

at org.jivesoftware.smackx.muc.MultiUserChat$8.processPacket(MultiUserChat.java:21 75)

at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader .java:822)

at org.jivesoftware.smack.PacketReader.processListeners(PacketReader.java:260)

at org.jivesoftware.smack.PacketReader.access$100(PacketReader.java:43)

at org.jivesoftware.smack.PacketReader$2.run(PacketReader.java:72)

When I later try to add listeners they dont work and I think this is related to the exception I get when I run join. Does anyone got any clues?

Thanks

Hey elias,

Check that the META-INF/smack.providers file is present in your classpath. That is the reason why you are getting the class cast exception.

Regards,

– Gato

that solved it, thanks!