Muc.join problem in applet

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

muc = new MultiUserChat(connection,"");

try (((


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(

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

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

at org.jivesoftware.smack.PacketReader.processListeners(

at org.jivesoftware.smack.PacketReader.access$100(

at org.jivesoftware.smack.PacketReader$

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?


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.


– Gato

that solved it, thanks!