Smack连Jabberd报stream:error (text)的解决办法

今天总算没白来公司加班,总算解决了Smack连Jabberd报stream:error (text)的问题。

其实也很简单,原来都是用

connection = new XMPPConnection(config.getString(“jabberip”));

错误信息为:

stream:error (text)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:320)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:63)
ERROR 08-12 06:45:10(JabberClient.java:53) Can NOT connect to the Jabber Server
ERROR 08-12 06:45:10(JabberClient.java:54) No response from the server.:
No response from the server.:
at org.jivesoftware.smack.NonSASLAuthentication.authenticate(NonSASLAuthentication
.java:58)

…….

现在改成

connection = new XMPPConnection(config.getString(“jabberip”),5222,”cdcfmx02″);

加了个serviceName,就ok啦!

现在就剩找个wap包月的手机的问题啦!

发表评论

电子邮件地址不会被公开。 必填项已用*标注