powered by Jive Software

创建聊天室出现ClassCastException

java.lang.ClassCastException: org.jivesoftware.smack.packet.DefaultPacketExtension cannot be cast to org.jivesoftware.smackx.packet.MUCUser

04-03 10:14:55.125: E/AndroidRuntime(27669): java.lang.ClassCastException: org.jivesoftware.smack.packet.DefaultPacketExtension cannot be cast to org.jivesoftware.smackx.packet.MUCUser

04-03 10:14:55.125: E/AndroidRuntime(27669): at org.jivesoftware.smackx.muc.MultiUserChat.getMUCUserExtension(MultiUserChat.jav a:2000)

04-03 10:14:55.125: E/AndroidRuntime(27669): at org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:364)

04-03 10:14:55.125: E/AndroidRuntime(27669): at src.geniusky.openfire.client.CreateRoomDialog.createRoom(CreateRoomDialog.java: 84)

04-03 10:14:55.125: E/AndroidRuntime(27669): at src.geniusky.openfire.client.CreateRoomDialog.onClick(CreateRoomDialog.java:67)

04-03 10:14:55.125: E/AndroidRuntime(27669): at android.view.View.performClick(View.java:3516)

04-03 10:14:55.125: E/AndroidRuntime(27669): at android.view.View$PerformClick.run(View.java:14110)

04-03 10:14:55.125: E/AndroidRuntime(27669): at android.os.Handler.handleCallback(Handler.java:605)

04-03 10:14:55.125: E/AndroidRuntime(27669): at android.os.Handler.dispatchMessage(Handler.java:92)

04-03 10:14:55.125: E/AndroidRuntime(27669): at android.os.Looper.loop(Looper.java:137)

04-03 10:14:55.125: E/AndroidRuntime(27669): at android.app.ActivityThread.main(ActivityThread.java:4429)

04-03 10:14:55.125: E/AndroidRuntime(27669): at java.lang.reflect.Method.invokeNative(Native Method)

04-03 10:14:55.125: E/AndroidRuntime(27669): at java.lang.reflect.Method.invoke(Method.java:511)

04-03 10:14:55.125: E/AndroidRuntime(27669): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)

04-03 10:14:55.125: E/AndroidRuntime(27669): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)

04-03 10:14:55.125: E/AndroidRuntime(27669): at dalvik.system.NativeStart.main(Native Method)

I assume that you also posted this at Stackoverflow, at least it is the same problem.

I have answered this question there: http://stackoverflow.com/questions/15763001/classcastexception-when-creating-muc -room-for-xmpp-group-chat-using-asmack