No response from server Smack org.jivesoftware.smackx.muc.MultiUserChat.create
来源:互联网 发布:压缩命令 linux gzip 编辑:程序博客网 时间:2024/05/14 05:17
Exception in thread "main" No response from server.:
at org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:367)
at com.smack.Test3CreateChatGroup.creatMultiRoom(Test3CreateChatGroup.java:44)
这个问题被搞了一天,下班之前终于搞定了,查了很多资料。
具体参考如下(我都没有解决)
1:http://blog.csdn.net/za143567229za/article/details/40654851
2:http://macleo.iteye.com/blog/1815024
3:应该是网络环境不好
最后看来一个评论,给了我思路:http://blog.csdn.net/lnb333666/article/details/7598683 14楼 传入房间的的jid,不是用户的,我之前遇到过。
MultiUserChat muc = new MultiUserChat(connection, "wq@192.168.1.1"); 这是我之前的写法(也试过很多种格式,均不行),看完评论觉得是地址写错了 .
接着仔细看了spark的群组,发现是 wq@muc.192.168.1.1。然后加上了muc,之前看了很多案例,都没有加muc,都是直接写的地址,不知道为啥我的要加这个。
不要以为加上这个就可以创建成功了,只是不会报错
还要加很多参数
感觉 muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT)); 这句最有用。
还有在其他帖子看到的一句话:
- /*---创建默认配置的聊天室 ---
- 先看看官方的文档:
- Creates a new multi user chat with the specified connection and room name. Note: no
- * information is sent to or received from the server until you attempt to
- * {@link #join(String) join} the chat room. On some server implementations,
- * the room will not be created until the first person joins it
- * 最重要一句:直到用户调用join方法的时候聊天室才会被创建
- */
- No response from server Smack org.jivesoftware.smackx.muc.MultiUserChat.create
- at org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:353)
- Could not find class 'org.jivesoftware.smackx.PrivateDataManager$PrivateDataIQProvider', r
- java.lang.NoClassDefFoundError org.jivesoftware.smackx.packet.DiscoverInfo$Identity
- Smack “No Response From Server”. Not sure why am i getting this error
- xmpp用户注册时报错:at org.jivesoftware.smack.XMPPConnection.sendPacket(XMPPConnection.java:488)
- No Response from the Server, Does it Hang or Spin?
- swagger出现no response from server错误的解决办法
- 短信猫JAVA二次开发包SMSLib,org.smslib.TimeoutException: No response from device解决方案
- 关于安卓6.0.1系统Xmpp不能链接的问题!“No response from the server”
- Swagger UI post请求时出现"no response from server"问题
- 报错:No principal was found in the response from the CAS server
- org.jivesoftware.smack_2.2.1的api
- openfire+smack实现聊天室功能MultiUserChat.isServiceEnabled问题
- CAS TGT 校验不成功:No principal was found in the response from the CAS server.WHO: audit:unknown
- Invalid response document returned from XmlRpc server
- How to create a server from scratch
- Docker Error response from daemon: client is newer than server
- SQL数据库 “内部一致性错误”
- Codeforces 2 A. Winner
- [KM算法] BZOJ 2539 [Ctsc2000]丘比特的烦恼
- 扫描二维码自动识别手机APP下载地址
- es入门级使用教程
- No response from server Smack org.jivesoftware.smackx.muc.MultiUserChat.create
- Mybatis类型转换介绍
- Spark 入门之十一:Spark数据处理常用的那几招
- C# Enum,Int,String的互相转换 枚举转换
- JENKINS+maven+ssh+shell 完成自动化部署工具的开发
- WinPE系统对硬盘分区
- [最小乘积生成树 分治] BZOJ 2395 [Balkan 2011]Timeismoney
- 奇妙的等式 && 精妙的证明
- JAVA自学之每日一题(五)