githubw2015 / asmack

一个小的例子
https://github.com/githubw2015/asmack
Other
0 stars 0 forks source link

MultiUserChat does not create a room #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi all, this a simple extract of my code, which fires an exception: 

chat = new MultiUserChat(c, room);
chat.create("room");

This is what I get in the log: 

E/AndroidRuntime(  218): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  218): java.lang.ClassCastException:
org.jivesoftware.smack.packet.DefaultPacketExtension
E/AndroidRuntime(  218):    at
org.jivesoftware.smackx.muc.MultiUserChat.getMUCUserExtension(MultiUserChat.java
:2000)
E/AndroidRuntime(  218):    at
org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:364)

I'm using the latest version of android (android-7, sdk 2.1), the asmack
patch released on 25/05/2010 and an openfire server.

Cheers,
Angelo

Original issue reported on code.google.com by angelo69...@libero.it on 1 Jun 2010 at 12:36

GoogleCodeExporter commented 8 years ago
Has this been fixed??

Original comment by nzan...@gmail.com on 14 Oct 2010 at 5:47

GoogleCodeExporter commented 8 years ago
Hi,I also has this trouble.
the code:
muc = new MultiUserChat(conn1, "atestroom@conference.jabber.org");
muc.create("atestroom");

This is what I get in the log: 
E/AndroidRuntime(  558): java.lang.ClassCastException: 
org.jivesoftware.smack.packet.DefaultPacketExtension
E/AndroidRuntime(  558):        at 
org.jivesoftware.smackx.muc.MultiUserChat.getMUCUserExtension(MultiUserChat.java
:2000)
E/AndroidRuntime(  558):        at 
org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:364)
....
W/ActivityManager(   61): Activity pause timeout for HistoryRecord{4066ee70 com.
lingpan.ansmack/.AnSmackActivity}

I'm using the latest version of android (android-9, sdk 2.3), the asmack using
asmack-jse-buddycloud-2010.12.11.jar and "jabber.org" as server.

If you can help me with that, that would be really greatfull !
Thank you in advance and have a nice day !
Chen Wen

Original comment by TT0...@gmail.com on 10 Jan 2011 at 3:36

GoogleCodeExporter commented 8 years ago
I have basically solved the problem,but,I can't using 
“submitForm.setAnswer”。

Original comment by TT0...@gmail.com on 11 Jan 2011 at 9:38

GoogleCodeExporter commented 8 years ago
hi, I am also getting the same issue. Could you please tell me how you fixed it.

Original comment by chandub...@gmail.com on 4 Mar 2011 at 7:29

GoogleCodeExporter commented 8 years ago
There is a project called 'Beem', look it up. 

Original comment by shaunzel...@gmail.com on 4 Mar 2011 at 7:51

GoogleCodeExporter commented 8 years ago
Hi, I used asmack-android-7-beem.jar from Beem project, But still I am getting 
the same error.

03-05 15:32:10.007: WARN/System.err(244): java.lang.ClassCastException: 
org.jivesoftware.smack.packet.DefaultPacketExtension
03-05 15:32:10.118: WARN/System.err(244):     at 
org.jivesoftware.smackx.muc.MultiUserChat.getMUCUserExtension(MultiUserChat.java
:2000)
03-05 15:32:10.128: WARN/System.err(244):     at 
org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:364)

Original comment by chandub...@gmail.com on 5 Mar 2011 at 10:04

GoogleCodeExporter commented 8 years ago
I meet the problem,but is difference from above,the log is 
     03-31 01:40:43.194: WARN/System.err(465): No response from server.: 
happen in when 
    MultiUserChat groupChat = new MultiUserChat(connection,"fantasy-room@conference.ruui-pc");
    groupChat.create("我的家园");//room的昵称,名字
    groupChat.join("睡");//登录者以睡这个昵称加入到聊天室

 is the a problem?I have so me confuse blow:
   first:"fantasy-room@conference.ruui-pc" param is must exist in the xmppserver(openfire)?
   second:what the exist meaning :groupChat.create("name"),the param name is mean what?
   third:groupChat.join("睡"): is this the login user use "睡" nickname to go to the room chat?
   who can help?thank you very much

Original comment by zengqin...@gmail.com on 31 Mar 2011 at 1:46

GoogleCodeExporter commented 8 years ago
I have same issue when create group chat.
Who can solve this bug..?
Thanks!

Original comment by hnbang1...@gmail.com on 12 May 2011 at 10:41

GoogleCodeExporter commented 8 years ago
Same issue:
05-13 08:00:59.839: ERROR/AndroidRuntime(279): Caused by: 
java.lang.ClassCastException: 
org.jivesoftware.smack.packet.DefaultPacketExtension
05-13 08:00:59.839: ERROR/AndroidRuntime(279):     at 
org.jivesoftware.smackx.muc.MultiUserChat.getMUCUserExtension(MultiUserChat.java
:2000)
05-13 08:00:59.839: ERROR/AndroidRuntime(279):     at 
org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:364)

Original comment by hnbang1...@gmail.com on 13 May 2011 at 1:05

GoogleCodeExporter commented 8 years ago

use muc.join("name"); directly instead of muc.create("name");
worked for me

Original comment by mozart...@gmail.com on 16 May 2011 at 2:11

GoogleCodeExporter commented 8 years ago
Juest muc.join("name"); 

Original comment by Z.Black....@gmail.com on 1 Sep 2011 at 8:47

GoogleCodeExporter commented 8 years ago
Please Guys  did anyone really solved this issue?

when i am creating the conference

muc.create("name");

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

still didn't find the answer...

thank you

Original comment by anthonyk...@gmail.com on 9 Dec 2011 at 3:39

GoogleCodeExporter commented 8 years ago
i am tired of finding the solution for 
java.lang.ClassCastException: 
org.jivesoftware.smack.packet.DefaultPacketExtension
issue, isn't this fixed, is asmack a wrong choice ??

Original comment by ankitpat...@gmail.com on 12 Jan 2012 at 8:11

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
:) this worked for me. checkout the thread 
http://code.google.com/p/asmack/issues/detail?id=28

i used the "asmack.jar" uploaded in it and copied file "smack.providers" to 
root dir, that is all, and error is gone.

may be copying "smack.providers" can fix it, i did not tried it. 
Good luck!

Original comment by ankitpat...@gmail.com on 12 Jan 2012 at 3:02

GoogleCodeExporter commented 8 years ago
the second attribute room is "room@192.168.39.69",is this correct?

Original comment by syk1...@gmail.com on 25 May 2012 at 7:38

GoogleCodeExporter commented 8 years ago
Can anyone please upload the right code snippet for creating chat room?

Original comment by develope...@gmail.com on 5 Jun 2015 at 10:19