求助:SASLErrorc usingg PLAIN:not-authorized

研究的并不深入,只是记录下易出的错误以及解决办法
1.spark源码运行出错,如下
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jivesoftware.launcher.Startup.start(Startup.java:94)
at org.jivesoftware.launcher.Startup.main(Startup.java:44)
Caused by: java.lang.NullPointerException
at org.jivesoftware.spark.PluginManager.loadPlugins(PluginManager.java:239)
at org.jivesoftware.Spark.startup(Spark.java:200)
... 6 more
解决办法:
缺少jar包,把build出来(ant编译)的target/lib下的spark.jar拷到项目中,右键Build Path-&Add to Build Path可解决问题
2.openfire源码编译错误,这种错误很可能是哪里的路径不对或不存在,可能是VM参数写错了,导致找不到正确的主目录
确保目录正确的情况下,再将错误的地方打断点,一步步调试看路径变量的参数,
我的错误就是有个路径显示是:....\workspace\Openfire\target\openfire\plugins
可是我一看target下只有个log文件夹,可能ant编译的时候出错了,用ant重新编译了一下,解决了
3.出错信息:message from server: &Host is not allowed to connect to this MySQL server&可能是网络访问权限的事
解决办法& 参照这个
4.登录Openfire时报错,可以查看是不是openfire.xml的错误
用户名和密码的登录信息都在ofuser表中,可以登录数据库直接查看
5.Openfire编译出错
java.lang.NullPointerException
&&&&&& at org.jivesoftware.admin.AdminConsole.getAppName(AdminConsole.java:122)
解决办法:需要将admin-sidebar.xml和openfire_i18n_en.properties这2个文件直接放在openfire/bin目录下即可解决这个问题。
connection连接时报错Exception in thread &main& java.lang.NoClassDefFoundError: de/measite/minidns/DNSCache
缺少jar包minidns-0.1.3.jar、jxmpp-core-0.4.1.jar
报错java.lang.NoClassDefFoundError: org/jxmpp/util/XmppStringUtils
缺少smack-core-4.1.0-alpha1-SNAPSHOT.jar、smack-tcp-4.1.0-alpha1-SNAPSHOT.jar、xpp3-1.1.4c.jar包
7.用smack连接openfire时出错
- javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException
解决办法:smack4.1.x版本后的连接的配置是
XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()
&&&&&&&&&&&&&&& .setUsernameAndPassword(&test&, &123&)
&&&&&&&&&&&&&&& .setServiceName(&jabber.org&).setHost(&127.0.0.1&)
&&&&&&&&&&&&&&& .setPort(5222)
&&&&&&&&&&&&&&& .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)
&&&&&&&&&&&&&&& .build();
&&&&&&& AbstractXMPPConnection conn1 =new XMPPTCPConnection(config);
8. 报错 org.kxml2.io.XmlReader但相应的jar包中没有这个类,可能是jar包冲突,将所有的jar包移除,
按需要一个个添加,避免添加不必要的,参照http://sourceforge.net/p/cgupnpjava/discussion/258158/thread/366e7eca#966d
9. 报错SASLError using SCRAM-SHA-1: not-authorized或者
SASLError using SCRAM-SHA-1: not-authorized或者
SASL Authentication failed. No known authentication mechanisims.
这样的错误是认证机制导致的,需要加入smack-sasl-provided-4.1.4.jar包,不行的话还要
SASLAuthentication.blacklistSASLMechanism(&SCRAM-SHA-1&);或
SASLAuthentication.blacklistSASLMechanism(&DIGEST-MD5&);先去掉认证机制测试就正常了,报哪个机制的错就将哪个机制加入黑名单
再加一个报错SASLError using DIGEST-MD5: not-authorized:可能的原因是获得connection时service name 有错,或者登陆的用户名和密码不对
10. 报错No response received within reply timeout. Timeout was 5000ms (~5s). Used filter: No filter used or filter was 'null'.
或者报错:
Exception in thread &main& java.lang.NullPointerException
&&& at org.jivesoftware.smack.util.stringencoder.Base64.encode(Base64.java:64)
&&& at org.jivesoftware.smack.util.stringencoder.Base64.encode(Base64.java:60)
&&& at org.jivesoftware.smack.util.stringencoder.Base64.encodeToString(Base64.java:42)
原因是缺少jar包,smack-java7-4.1.4.jar包
11.smack传送文件时需要创建文件管理器OutgoingFileTransfer fileTransfer = fileTransferManager.createOutgoingFileTransfer(userJid);
这里的userJid必须是full jid 加上资源来源的jid,不然报错:java.lang.IllegalArgumentException: The provided user id was not fully qualified
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:5298次
排名:千里之外
原创:15篇
(2)(1)(3)(2)(1)(3)(1)(3)(1)(1)(4)smack(4)
解析XMPP协议分析与应用
/data/html//96203.html
  XMPP是一种基于XML的协议,它继承了在XML环境中灵活的发展性。因此,基于XMPP的应用具有超强的可扩展性。经过扩展以后的XMPP可以通过发送扩展的信息来处理用户的需求,以及在XMPP的顶端建立如内容发布系统和基于地址的服务等应用程 序。而且,XMPP包含了针对服务器端的软件协议,使之能与另一个进行通话,这使得开发者更容易建立客户应用程序或给一个配好系统添加功能。XMPP(可扩展消息处理现场协议)是基于可扩展标记语言(XML)的协议,它用于即时消息(IM)以及在线现场探测。它在促进服务器之间的准即时操作。这个协议可能最终允许因特网用户向因特网上的其他任何人发送即时消息,即使其操作系统和浏览器不同。XMPP的前身是Jabber,一个开源形式组织产生的网络即时通信协议。XMPP目前被IETF国际标准组织完成了标准化工作。
  1& XMPP的地址和数据结构
  1.1 实体地址
  XMPP整体框架如图1所示。图中,XMPP框架的各类实体(如XMPP客户、服务器和网关等)的地址称为甲吧地址(Jabber Identifier,JID)。JID惟一确定进行即时消息和在线状态信息通信的独立对象或实体,并可兼容其他即时通信系统(如MSN等)相应的实体标识及其在线状态信息。其语法规则为:[节点″@″] 域名[″/″资源],其中各个域的长度不能超过1 023 字节,总长度最大为3 071字节。
  XMPP中定义了三个角色,客户端,服务器,网关。通信能够在这三者的任意两个之间双向发生。服务器同时承担了客户端信息记录,连接管理和信息的路由功能。网关承担着与异构即时通信系统的互联互通,异构系统可以包括SMS(短信),MSN,ICQ等。基本的网络形式是单客户端通过TCP/IP连接到单服务器,然后在之上传输XML。传输的是与即时通讯相关的指令。在以前这些命令要么用2进制的形式发送(比如QQ),要么用纯文本指令加空格加参数加换行苻的方式发送(比如MSN)。而XMPP传输的即时通讯指令的逻辑与以往相仿,只是协议的形式变成了XML格式的纯文本。这不但使得解析容易了,人也容易阅读了,方便了开发和查错。而XMPP的核心部分就是一个在网络上分片断发送XML的流协议。这个流协议是XMPP的即时通讯指令的传递基础,也是一个非常重要的可以被进一步利用的网络基础协议。所以可以说,XMPP用TCP传的是XML流。
  域名指定了实体连接的XMPP服务器。每个可用XMPP服务器都拥有一个完整域名,域名可在域名系统(DNS)中查找;节点可表示某用户、一类应用或某项服务,所有节点都对应一个精确的域名;资源用来识别属于用户的特殊对象(如设备或位置),允许一个用户同时以多个资源与同一XMPP服务器连接。
  1.2 XMPP的数据结构
  由于XMPP是基于XML的协议,因此用户可根据自己的需要定义标记,表述几乎任何一种结构化数据,并可方便地创建定制的应用或增加功能。
  1.2.1 三个顶级XML元素
  XMPP定义的3个关键顶级XML元素为&message/&、&presence/&和&iq/&(info/query),每个元素都可以通过属性和名字空间包含大量数据,其属性和名字空间都是XMPP的组成部分。
  &message/&元素用来包含2个XMPP实体间互相发送的消息内容;&presence/&元素表示实体可用性信息,可用性信息有“可用”和“不可用”2种;&iq/&元素用来构建2个实体间的会话,并且允许实体间来回传送XML格式的请求和响应以便取得或设置公共的用户信息,如名字等。
  即时通信中名字冲突问题使用XML的命名空间特性来解决。XML命名空间定义了一种将XML中使用的元素和属性与统一资源定位符(Uniform Resource Locator,URL)引用联系起来对元素和属性进行定义的方法。 统一资源定位符(URL)是用于完整地描述Internet上网页和其他资源的地址的一种标识方法。Internet上的每一个网页都具有一个唯一的名称标识,通常称之为URL地址,这种地址可以是本地磁盘,也可以是局域网上的某一台计算机,更多的是Internet上的站点。简单地说,URL就是Web地址,俗称“网址”。
  1.2.2 XMPP的数据结构
  从结构上看,XMPP有3种数据:XML流、流认证和XML节。XML流是实体交换XML元素的容器,以&STream&开始,以&/stream&结束,是通信双方采用异步方式进行数据传输的标准方法,在整个XMPP通信过程中处于最外层;XML节是实体通过XML流传输的结构化信息单元,在XML流中以深度为1的子标记开头,并以深度为1的子标记结束,这些标记为&message/&、&presence/&和&iq/&。
  XMPP为XML流扮演通用“传输层”的角色。XML流中包含传输的认证信息和现场消息,XMPP能使数据高效路由至最合适的请求源,并最大限度地简化客户机上的实现,使跨应用实时交流信息成为可能。
  2& 工作过程
  (1)节点(如yb、pt)向本地服务器连接。
  ①XMPP用户通过开启一个从客户端到服务器端的XML流,来申请一个在服务器上的Socket连接。
  SEND: &stream:stream
  to=′′
  xmlns=′jabber:client′
  xmlns:stream=′http://etherx.jabber.org/streams′&
  ②服务器通过开启一个从服务器到客户端的XML流进行回复。
  RECV: &stream:stream
  from=′′
  id=′′
  xmlns=′jabber:client′
  xmlns:stream=′http://etherx.jabber.org/streams′&
  (2)节点向本地服务器申请登录。
  ①用户询问登录服务器时需提供的信息。
  SEND: &iq id=′2′ type=′get′&
  &query xmlns=′jabber:iq:auth′&
  &username&yb&/username&
  &/query&
  ②服务器回应用户,告知用户登录所需要的信息。
  ③用户提供所需的信息。
  ④服务器响应一个空的类型为“result”的iq元素,表明登录成功。
  RECV:&iq id=′3′ type=′result′/&
  ⑤yb用户发送当前状态给服务器,表明其在线。
  SEND: &presence&
  &status&ONline&/status&
  &/presence&
  (3)用户获得花名册,好友增加一个联系人(如yb获知朋友sd在线)。
  (4)用户间发送消息(如yb向sd发送消息)。
  用户发送一条消息:
  SEND: &message to′sd@jabber.org′&
  &body&Where are you?&/body&
  &/message&
  服务器会根据XMPP用户的会话信息加上一个源地址,这样接收者收到消息时,消息中已经包含了源地址。
  (5)XMPP服务器根据目标JID中的域名查找、连接到目标服务器并进行认证(如使用DNS查找jabber.org,连接到jabber.org服务器上并进行认证)。
  (6)XMPP服务器jabber.org证实sd连接到该服务器上,yb被授权与sd进行通信。
  (7)数据在yb与sd间流动。
  (8)用户退出,退出时只需要关闭&stream&。
  3& 安全机制
  3.1 简单认证和安全层协商机制
  简单认证和安全层(Simple Authentication and Security Layer,SASL)可以为基于连接的协议加入认证机制,提供KERBEROS_V4、PLAIN和DIGEST-MD5等多种认证方法。每种认证机制包含认证机制名、认证过程初始化命令、认证控制命令、特定8位码和解释器等信息。
  在认证过程中,认证服务器完成认证、授权标识传送、简单认证和安全层协商3个方面的工作。在XMPP中,SASL处理步骤如下(C:客户端,S:SASL认证服务器):
  (1)C、S之间建立连接。(2)S向C提供认证机制列表。(3)C在认证机制列表中选择一种认证机制。(4)S向C询问授权信息。(5)C向S提交授权信息。(6)S向C返回认证成功或失败信息。
  3.2 回拨认证
  在通信过程中,2个XMPP服务器之间经常需要通信,为避免利用服务器欺骗方式进行信息伪造,XMPP 采用了回拨认证机制。回拨认证依靠DNS技术完成,利用回拨认证机制,一个服务器可以确认与自己建立连接的服务器是否经过合法授权,回拨认证过程为:(1)源服务器和接收服务器建立连接,并向接收服务器请求认证。接收服务器回应,并分配认证会话ID。(2)源服务器向接收服务器发送认证密钥。(3)接收服务器与认证服务器建立连接。认证服务器同时为该认证会话分配一个验证会话ID。(4)接收服务器把源服务器提交来的密钥和验证会话ID
发送给认证服务器,请求验证。(5)认证服务器验证密钥,并给接收服务器返回认证结果。(6)接收服务器给源服务器返回认证结果。
  3.3 加& 密
  虽然SASL提供了先进的认证机制,通信双方必须经过特定的授权认证才能进行正常通信,但是登录信息一般都是密码和用户名等重要信息,它们大多采用明文方式传送,因此很容易被拦截查看到。为解决该问题,XMPP采用基于传输层安全协议的“STARTTLS”扩展来为通信双方提供机密性和数据完整性服务。TLS 协议包括两个协议组―― TLS 记录协议和 TLS 握手协议――每组具有很多不同格式的信息。TLS 记录协议是一种分层协议。每一层中的信息可能包含长度、描述和内容等字段。记录协议支持信息传输、将数据分段到可处理块、压缩数据、应用
MAC 、加密以及传输结果等。对接收到的数据进行解密、校验、解压缩、重组等,然后将它们传送到高层客户机。TLS 连接状态指的是TLS 记录协议的操作环境。它规定了压缩算法、加密算法和 MAC 算法。TLS 记录层从高层接收任意大小无空块的连续数据。密钥计算:记录协议通过算法从握手协议提供的安全参数中产生密钥、 IV 和 MAC 密钥。TLS 握手协议由三个子协议组构成,允许对等双方在记录层的安全参数上达成一致、自我认证、例示协商安全参数、互相报告出错条件。
  TLS协议框架主要有2个层次的协议:TLS握手协议和TLS记录协议。TLS握手协议用来让服务器与客户在传输应用层数据之前交换TLS协议版本信息、协商加密算法、进行(相互)身份认证并交换密钥。TLS记录协议用来将应用层提供的信息进行分组、压缩、数据完整性检查和加密。数据完整性检查通过比较传输前后使用安全散列函数(如SHA和MD5 等)计算出来的数据的MAC值是否一致来完成。数据加密采用对称密码算法(如R4和DES等)。对数据进行完整性检查和加密的密钥由TLS握手协议来协商。
  XMPP中采用的STARTTLS扩展处理流程如下(C:客户端,S:TLS服务器):
  (1)C、S之间建立XML流会话连接。
  (2)S 向C 发送STARTTLS扩展服务需求及支持的其他认证机制列表,代码实例如下:
  &stream:features&
  &starttls xmlns=′urn:ietf:params:xml:ns:xmpp-tls′&
  &required/&
  &/starttls&
  &mechanisms xmlns=′urn:ietf:params:xml:ns:xmppsasl′&
  &mechanism&DIGEST-MD5&/mechanism&
  &mechanism&PLAIN&/mechanism&
  &/mechanisms&
  &/stream:features&
  (3)C发送STARTTLS命令给S。
  (4)C、S中TLS握手协议开始协商相关加密算法及密钥。
  (5)若TLS握手协议协商成功,则关闭当前XML流会话,C发起一个新的XML流会话,所有传送的信息均被TLS记录协议加密。TLS握手协议协商不成功则发出警告信息。
  (6)S向C回复新XML流会话。
  4& 客户端程序设计中的关键问题
  由于网络中已存在大量的XMPP服务器,在一般的应用开发中,只要设计自定功能的客户端程序即可,并可以选用Smack库来加速开发。
  (1)创建一个XMPP连接。因为XMPP使用TCP协议,所以首先必须创建一个网络连接,XMPPConnection就是Smack库用来创建与XMPP服务器连接的类,创建一个XMPP连接的代码如下:
  XMPPConnection connection=new XMPPConnection(″jab-
  ber.org″);
  如要创建加密连接,可以使用SSLXMPPConnection类:
  XMPPConnection connection=new SSLXMPPConnection(″jabber.org″);
  (2)登录。TCP连接创建后,需要使用用户名和密码登录到XMPP服务器,登录程序可以使用XMPPConnection.login(String username,String password)方法。登录后就可以和其他人聊天。
  connection.login(″yb″,″password″);//connection为已创建的XMPP连接,下同
  connection.createChat(″″)。sendMessage
  (″Hello!″);
  (3)操作名册。每个用户都包括:一个XMPP地址(如mailto:%E2%80%”)、名称或昵称(如″yb″),及其所属列表(如好友、同事等)。名册能够跟踪好友或某用户组是否在线及其状态信息,登录后,可以使用Roster类来取得好友或某用户组的状态,代码如下:
  Roster roster=con.getRoster( );
  for (Iterator i=roster.getEntries( );i.hasNext( ); ) {
  System.out.println(i.next( ));}
  名册信息通常是随时变化的,可能需要增加或删除。要监听名单及其在线状态的改变,可以使用RosterListener。
  (4)发送和接收消息。发送接收消息可以使用Chat和GroupChat类。下面介绍如何使用Chat发送文本消息,GroupChat的使用方法类似。
  Chat newChat=connection.createChat(″″);//创建新Chat
  newChat.sendMessage(″Hello!″);//发送消息″Hello!″
  利用Chat.sendMessage( )方法可以方便地创建一个消息对象,它的参数就是消息内容,执行后消息会发送出去。
  Chat newChat=connection.createChat(″″);
  newMessage.setBody(″Hi, I′m waiting for you.″);
  while (true) {
  Message message=newChat.nextMessage( );//等待对方发送消息
  newChat.sendMessage(message.getBody());//把对方
  }//发送来的消息发回去
  (5)修改状态。要修改状态可以用presence.Type.UNAV-ILABLE作为参数创建一个presence,状态将改变为不在线状态。
  Presence presence=new Presence(Presence.Type.UNAVAILABLE);
  presence.setStatus(″Gone skating″);
  5& 结束语
  目前,全球有20万个即时通信平台支持XMPP,有1 000万人在使用。简单的接口、开放的协议、互联的架构、权威的标准再加上坚实的用户基础是XMPP的优势。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:15519次
排名:千里之外
原创:13篇
转载:38篇
评论:12条
(1)(1)(2)(1)(2)(1)(1)(10)(32)xmpp - Smack Error not-authorized(401) - Stack Overflow
to customize your list.
Announcing Stack Overflow Documentation
We started with Q&A. Technical documentation is next, and we need your help.
Whether you're a beginner or an experienced developer, you can contribute.
I'm working with smack to create a chat room for my web site but as I want to change a rooms configuration or its members, when I want to get i'ts current members or just doing any other modification, I get Error not-authorized(401)!I'm connected with an administrator account which is the owner of the room too!
by the way I can do all these jobs through a client with out any problem!
any body has any Idea How can I fix it?
I just found the problem :) it was because I should have joined the room first and then I could manage it!
like this :
MultiUserChat room = new MultiUserChat(connection, roomId);
room.join("admin"); // missing line :)
Collection&Affiliate& currentMembers=room.getMembers();
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabledAre you the publisher?
about this channel
Report adult content:
click to rate:
More Channels
Channel Catalog
Articles on this Page
(showing articles 2181 to 2200 of 3865)
(showing articles 2181 to 2200 of 3865)
(Page 110)
04/18/15--00:43:
configuration=XMPPTCPConnectionConfiguration.builder();
configuration.setServiceName("192.168.1.53");
configuration.setPort(5222);
configuration.setSecurityMode(SecurityMode.disabled);
//connection.setPacketReplyTimeout(30000);
connection=new XMPPTCPConnection(configuration.build());
connection.setPacketReplyTimeout(30000);
connection.connect();
getting eror:
04-18 13:13:05.084: E/error(1424): SASLError using DIGEST-MD5: not-authorized
04/18/15--03:36:
We have one annoying issue with openfire. We use Openfire with AD auth and external MariaDB 5.5.41 database, using custom certificate, only TLS.
First, we are trying 3.9.3 with bundled java on windows server 2012 r2 standart (it's VM with 1 vCpu, 1024 mb RAM), and after 1 day or less openfire service show constant 100% CPU Usage, only helps stop|start service. We are trying update jre version to latest 7u76, but it is not helps.
Second, we are install Openfire 3.10 RC on centos7.1 (Linux openfire.local 3.10.0-229.1.2.el7.x86_64 #1 SMP Fri Mar 27 03:04:26 UTC
x86_64 x86_64 GNU/Linux) with bundled jre, we have expirience teh same issue - constant 100% cpu usage. Increasing Java Heap upto 384 mb doesn't help.
Attach latest logs.
04/18/15--04:22:
After installing Openfire for the first time, everything went smoothly and the server started without problems. However, after rebooting the server Openfire won't start at all. This is what happens:
Starting Openfire
# sudo service openfire start
best java alternative in: /usr/lib/jvm/java-7-openjdk-amd64/jre
Starting openfire: openfire.
* and nothing happens *
Error log is here:
It seems that Openfire cannot connect to mysql even though
The username and password are correct
I can log in to mysql with the same credentials from the command line: # mysql -u openfire -p
Mysql is running and is listening to port 3306
Mysql user 'openfire'@'localhost' does have sufficient permissions
Everything worked perfectly before the reboot...
These are my database settings from /etc/openfire/openfire.xml:
&connectionProvider&
&className&org.jivesoftware.database.DefaultConnectionProvider&/className&&/connectionProvider&&database&
&defaultProvider&
&driver&com.mysql.jdbc.Driver&/driver&
&serverURL&jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true&/serverURL&
&username encrypted="true"&c03b4b0f...&/username&
&password encrypted="true"&637a448f...&/password&
&testSQL&select 1&/testSQL&
&testBeforeUse&false&/testBeforeUse&
&testAfterUse&false&/testAfterUse&
&minConnections&5&/minConnections&
&maxConnections&25&/maxConnections&
&connectionTimeout&1.0&/connectionTimeout&
&/defaultProvider&&/database&&setup&true&/setup&
I managed to start the server with a trick: I disabled write access to openfire.xml, started Openfire service and re-enabled the write access. Openfire then showed the setup page to which I entered all the settings again - and voilà - the server is up and running. However, nobody can actually log in to the xmpp server. Everybody just gets "Not Authorized" error exept the admin account that was updated during the setup. Deleting and re-installing server certificate on the client doesn't work. The users are still in the database and are listed in the admin panel. This trick also reset all server settings. And if I restart openfire, it's the same thing all over again (access denied for user 'openfire'...)
Any help would be very much appreciated!
04/18/15--13:09:
i am trying to connect to my openfire server by this code
String DOMAIN = "my server ip";
AbstractXMPPC
XMPPTCPConnectionConfiguration.Builder config = XMPPTCPConnectionConfiguration.builder();
config.setSecurityMode(SecurityMode.disabled);
config.setUsernameAndPassword("admin@"+DOMAIN, "my password");
config.setServiceName(DOMAIN);
config.setHost(DOMAIN);
config.setPort(5222);
config.setDebuggerEnabled(true);
connection = new XMPPTCPConnection(config.build());
connection.setPacketReplyTimeout(10000);
connection.addConnectionListener(this);
connection.connect();
AccountManager AM = AccountManager.getInstance(connection);
AM.createAccount("userName", "password");
connection.disconnect();
System.out.println(":)");
catch(Exception e){
System.out.println(":(");
my code is in try catch statement but still after running this code nothing gets printed and i get this errors:
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.reflect.misc.Trampoline.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
... 48 more
Caused by: java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactory
at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitializatio n.java:153)
at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitializatio n.java:148)
at org.jivesoftware.smack.SmackInitialization.&clinit&(SmackInitialization.java:11 6)
at org.jivesoftware.smack.SmackConfiguration.getVersion(SmackConfiguration.java:96 )
at org.jivesoftware.smack.ConnectionConfiguration.&clinit&(ConnectionConfiguration .java:38)
at application.XmppFuncs.Register(XmppFuncs.java:56)
at application.Form1.btn_register_onclick(Form1.java:43)
... 57 more
Caused by: java.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 64 more
how can i fix this?
thanks in advance
04/19/15--02:52:
I'm trying to make a connection with GoogleTalk in android using Smack 4.1.
I've followed numerous tutorials examples on the internet yet still I can't seem to make it work.
public static final String HOST = "";
public static final int PORT = 5222;
public static final String SERVICE = "";
public static final String USERNAME = "";
public static final String PASSWORD = "mypassword";
My above credentials are correct...
XMPPTCPConnectionConfiguration.Builder connConfig = XMPPTCPConnectionConfiguration.builder();
connConfig.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
connConfig.setUsernameAndPassword(USERNAME, PASSWORD);
connConfig.setServiceName(SERVICE);
connConfig.setHost(HOST);
connConfig.setPort(PORT);
connConfig.setDebuggerEnabled(true);
//setCompressionEnabled(false).build();
//(HOST, PORT, SERVICE);
XMPPTCPConnection connection = new
XMPPTCPConnection(connConfig.build());
connection.connect();
Log.i("XMPPChatDemoActivity",
"[SettingsDialog] Connected to "+connection.getHost());
} catch (XMPPException ex) {
Log.e("XMPPChatDemoActivity",
"[SettingsDialog] Failed to connect to "+ connection.getHost());
Log.e("XMPPChatDemoActivity", ex.toString());
setConnection(null);
catch(SmackException ex){
Log.e("XMPPChatDemoActivity",
"[SettingsDialog] Failed to connect to "+ connection.getHost());
Log.e("XMPPChatDemoActivity", ex.toString());
setConnection(null);
catch(IOException ex){
Log.e("XMPPChatDemoActivity",
"[SettingsDialog] Failed to connect to "+ connection.getHost());
Log.e("XMPPChatDemoActivity", ex.toString());
setConnection(null);
I get `java.lang.ExceptionInInitializeError`
on this line
XMPPTCPConnectionConfiguration.Builder connConfig = XMPPTCPConnectionConfiguration.builder();
//line 184
Here is the complete stack trace:
FATAL EXCEPTION: Thread-120
java.lang.ExceptionInInitializerError
at com.example.samsungchatexample.MainActivity$4.run(MainActivity.java:184)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.ExceptionInInitializerError
at org.jivesoftware.smack.SmackConfiguration.getVersion(SmackConfiguration.java:96 )
at org.jivesoftware.smack.ConnectionConfiguration.&clinit&(ConnectionConfiguration .java:38)
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.jivesoftware.smack.SmackInitialization.loadSmackClass(SmackInitialization.j ava:213)
at org.jivesoftware.smack.SmackInitialization.parseClassesToLoad(SmackInitializati on.java:193)
at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitializatio n.java:163)
at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitializatio n.java:148)
at org.jivesoftware.smack.SmackInitialization.&clinit&(SmackInitialization.java:11 6)
Caused by: java.lang.NoClassDefFoundError: javax.naming.directory.InitialDirContext
at org.jivesoftware.smack.util.dns.javax.JavaxResolver.&clinit&(JavaxResolver.java :50)
Can someone please help me with this ? I've tested this on `KitKat` and `JellyBean`
Same exception on both so this is not a glitch with context to OS versions. What am I missing ?
note: I've tested it on emulator as well as on real device.
I've added all the jars which were included in Smack 4.1
04/19/15--06:24:
This is the complete StackTrace, i saw on internet some where that Flow also faced this issue some time in 2011 using aSmackbut I'm not using aSmack. Using Smack 4.1 along with jxmpp:
XMPPTCPConnectionConfiguration.Builder connConfig = XMPPTCPConnectionConfiguration.builder();
connConfig.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
connConfig.setUsernameAndPassword(USERNAME, PASSWORD);
connConfig.setServiceName(SERVICE);
connConfig.setHost(HOST);
connConfig.setPort(PORT);
connConfig.setDebuggerEnabled(true);
Exception is on this line:
XMPPTCPConnectionConfiguration.Builder connConfig = XMPPTCPConnectionConfiguration.builder();
Stack Trace:
Process: com.example.samsungchatexample, PID: 2142
java.lang.VerifyError: org/jivesoftware/smack/sasl/javax/SASLJavaXMechanism
at org.jivesoftware.smack.sasl.javax.SASLJavaXSmackInitializer.initialize(SASLJava XSmackInitializer.java:28)
at org.jivesoftware.smack.SmackInitialization.loadSmackClass(SmackInitialization.j ava:232)
at org.jivesoftware.smack.SmackInitialization.parseClassesToLoad(SmackInitializati on.java:193)
at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitializatio n.java:163)
at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitializatio n.java:148)
at org.jivesoftware.smack.SmackInitialization.&clinit&(SmackInitialization.java:11 6)
at org.jivesoftware.smack.SmackConfiguration.getVersion(SmackConfiguration.java:96 )
at org.jivesoftware.smack.ConnectionConfiguration.&clinit&(ConnectionConfiguration .java:38)
at com.example.samsungchatexample.MainActivity$4.run(MainActivity.java:202)
at java.lang.Thread.run(Thread.java:841)
These are the jars which i have in project buildpath .. am i missing something ??
04/19/15--08:43:
After upgrading from 3.9.1 to 3.10 the Spark client receives "Invalid username or Password" I am using Windows 2008 R2 Active Directory. This worked fine under 3.9.1. What is even more puzzling is that SparkWeb CAN login using LDAP credentials it is the Fat Client giving me trouble.
04/19/15--16:22:
I've got this weird issue with my server. On my home server, my android applica it can connect, register, create nodes and get nodes.
However, on a server I just recently bought, I'm unable to create or get nodes. My application is able to register accounts and even log into the server, but can't create a node.
Is there some setting I need to activate to enable nodes? I can't seem to find anything different between my home server settings and my purchased server settings.
All ports are open by the way.
Any help is appreciated.
Thank you!
04/19/15--23:23:
I want to develop chat app in android.
So, I am using smack4.1 version. But i am unable to connect openfire server(which is located my local) using smack4.1.
Could you please provide sample code for connecting openfire server from android client?
And could you provide link for smack4.1 API.
Thanks in advance...
04/20/15--03:42:
Hi guys. I looked all over the net, removed, changed things, and, of course, got confused. Could you please tell me what is wrong with my code ? Thank you for your time.
package naur.
import android.app.A
import android.os.B
import android.view.V
import android.widget.B
import android.widget.EditT
import org.jivesoftware.smack.SmackE
import org.jivesoftware.smack.XMPPE
import org.jivesoftware.smack.bosh.BOSHC
import org.jivesoftware.smack.bosh.XMPPBOSHC
import java.io.IOE
public class Login extends Activity {
private static EditText Username, P
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
Username = (EditText) findViewById(R.id.Login_Username);
Password = (EditText) findViewById(R.id.Login_Password);
login = (Button) findViewById(R.id.LogIn_Button);
BOSHConfiguration.Builder boshConfiguration = BOSHConfiguration.builder()
.setUsernameAndPassword(String.valueOf(Username),String.valueOf(Password))
.setHost("www.////.mobi")
.setServiceName("////.mobi")
.setFile("/http-bind/")
.setPort(7070)
.setUseHttps(false);
XMPPBOSHConnection connection = new XMPPBOSHConnection(boshConfiguration.build());
login.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
connection.connect();
} catch (SmackException | XMPPException | IOException e) {
throw new IllegalStateException(e);
connection.login();
} catch (SmackException | XMPPException | IOException e) {
throw new IllegalStateException(e);
I get this error when I click on my LogIn_Button and then the app crashes :
04-20 12:27:05.463
/naur.naur E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:2154)
at android.view.View.performClick(View.java:2538)
at android.view.View$PerformClick.run(View.java:9152)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at android.view.View$1.onClick(View.java:2149)
at android.view.View.performClick(View.java:2538)
at android.view.View$PerformClick.run(View.java:9152)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at android.view.ViewGroup.addViewInner(ViewGroup.java:1976)
at android.view.ViewGroup.addView(ViewGroup.java:1871)
at android.view.ViewGroup.addView(ViewGroup.java:1851)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:228)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:218)
at android.app.Activity.setContentView(Activity.java:1668)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at android.view.View$1.onClick(View.java:2149)
at android.view.View.performClick(View.java:2538)
at android.view.View$PerformClick.run(View.java:9152)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
04/20/15--11:19:
Hi, I have been having trouble getting VCards to work. Saving my own VCard seems to work fine, however when trying to retrieve the VCard for another user, I get this error:
XMPPError: feature-not-implemented - cancel
Are VCards currently operational or is it still unimplemented?
Are there alternatives to VCards? I would like to query the server for information on a particular user when another user wants to look at their profile.
04/20/15--12:20:
helloto all,
fastpathpluginis compatible withopenfire3.10rc?
04/20/15--14:33:
Hi GuysI am trying to build a bot which is connected as a component to an openfire 3.9.3 server using smack 4.1.0.This smack has to receive a file an process it.The thing it's that spark client says "The user is offline. Will auto-send "xyz.jpg" when user comes back online".And there is no transfer.What am i doing wrong?How can i enable the presence on a component?Any help will be apreciate..
04/20/15--23:44:
I have cloned the Smack repository and trying to build it using gradle tasks, but unable to solve the errors.
Following is a dump of the commands and results :
D:\Android\android tools and libraries\Smack\Smack&gradle cleanBUILD SUCCESSFUL
D:\Android\android tools and libraries\Smack\Smack&gradle build
:smack-core:test
java.lang.RuntimeException: java.lang.InterruptedException
at org.jivesoftware.smack.PacketCollectorTest$1.run(PacketCollectorTest.
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
.await(AbstractQueuedSynchronizer.java:2052)
at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:
at org.jivesoftware.smack.PacketCollector.nextResultBlockForever(PacketC
ollector.java:150)
at org.jivesoftware.smack.PacketCollectorTest$1.run(PacketCollectorTest.
... 1 more
D:\Android\android tools and libraries\Smack\Smack\smack-debug-slf4j\src\main\ja
va\org\jivesoftware\smackx\debugger\package-info.java:1: error: malformed floati
ng point literal
../../../../../../../../smack-debug/src/main/java/org/jivesoftware/smackx/debugg
er/package-info.java
D:\Android\android tools and libraries\Smack\Smack\smack-debug-slf4j\src\main\ja
va\org\jivesoftware\smackx\debugger\package-info.java:1: error: malformed floati
ng point literal
../../../../../../../../smack-debug/src/main/java/org/jivesoftware/smackx/debugg
er/package-info.java
D:\Android\android tools and libraries\Smack\Smack\smack-debug-slf4j\src\main\ja
va\org\jivesoftware\smackx\debugger\package-info.java:1: error: malformed floati
ng point literal
../../../../../../../../smack-debug/src/main/java/org/jivesoftware/smackx/debugg
er/package-info.java
D:\Android\android tools and libraries\Smack\Smack\smack-debug-slf4j\src\main\ja
va\org\jivesoftware\smackx\debugger\package-info.java:1: error: malformed floati
ng point literal
../../../../../../../../smack-debug/src/main/java/org/jivesoftware/smackx/debugg
er/package-info.java
D:\Android\android tools and libraries\Smack\Smack\smack-debug-slf4j\src\main\ja
va\org\jivesoftware\smackx\debugger\package-info.java:1: error: malformed floati
ng point literal
../../../../../../../../smack-debug/src/main/java/org/jivesoftware/smackx/debugg
er/package-info.java
D:\Android\android tools and libraries\Smack\Smack\smack-debug-slf4j\src\main\ja
va\org\jivesoftware\smackx\debugger\package-info.java:1: error: malformed floati
ng point literal
../../../../../../../../smack-debug/src/main/java/org/jivesoftware/smackx/debugg
er/package-info.java
D:\Android\android tools and libraries\Smack\Smack\smack-debug-slf4j\src\main\ja
va\org\jivesoftware\smackx\debugger\package-info.java:1: error: malformed floati
ng point literal
../../../../../../../../smack-debug/src/main/java/org/jivesoftware/smackx/debugg
er/package-info.java
D:\Android\android tools and libraries\Smack\Smack\smack-debug-slf4j\src\main\ja
va\org\jivesoftware\smackx\debugger\package-info.java:1: error: malformed floati
ng point literal
../../../../../../../../smack-debug/src/main/java/org/jivesoftware/smackx/debugg
er/package-info.java
D:\Android\android tools and libraries\Smack\Smack\smack-debug-slf4j\src\main\ja
va\org\jivesoftware\smackx\debugger\package-info.java:1: error: class, interface
, or enum expected
../../../../../../../../smack-debug/src/main/java/org/jivesoftware/smackx/debugg
er/package-info.java
:smack-debug-slf4j:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':smack-debug-slf4j:compileJava'.
& C see the compiler error output for details.
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
04/21/15--07:34:
I use aSmack 3.2.2 but server is last, I can't create group chat, how i do ?
i try from this
, How i change (necessary aSmack 3.2.2)
Help me, please Thanks.
04/21/15--08:22:
I have a web app that connects to OpenFire over AJP13.
The traffic is forwarded to OpenFire from IIS using the Jakarta ISAPI redirect module.
Works great when connecting to one dedicated OpenFire server.
I have a customer that would like to enable some form of load balancing and fail over.
In the past I've been able to add a JVMROUTE to AJP13 connections to allow the Jakarta Redirect to perform some load balancing.
Is this possible with OpenFire when communication is over AJP13?
04/21/15--09:36:
Hello everyone,
I tried to use Smack API with SSL and proxy socks5. I found some examples with SSL setting config.setSocketFactory(SSLSocketFactory.getDefault()).
But when I use ConnectionConfiguration with ProxyInfo, I have some troubles like :
AVERTISSEMENT: Connection closed with error
java.io.EOFException: input contained no data
In my environment, I set up Dante server and, in log file, I have this information : broken pipe.
Do you some ideas to help me ?
Thanks a lot!
04/21/15--14:24:
We are starting to play around with dynamic groups in Active Directory (2012 functionality).
They show up in AD as Query-based Distribution Groups.
however, they don't seem to be picked up by Openfire at all while the security and regular distribution groups show up without issue.
Is this a shortcoming of Openfire or is there additional configuration to get this working?
04/21/15--21:01:
Hi, I am recieving a NoResponseException when making a xmpp connection. I am not expecting a response in the application after I send a message through the connection. Below is where I am using the code to make the connection and the call to the connect method. It seems that I get a response later after 5 min instead of 5s. Is there away around this besides setting the packet reply time out to a greater amount?
Thanks in advance,
androidNotificationHandler.connect(senderId, password);
public void connect(long senderId, String apiKey)
throws XMPPException, IOException, SmackException {
XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()
.setSecurityMode(XMPPTCPConnectionConfiguration.SecurityMode.disabled)
.setPort(AndroidNotificationHandler.GCM_PORT)
.setHost(AndroidNotificationHandler.GCM_SERVER)
.setSocketFactory(SSLSocketFactory.getDefault())
.setServiceName(AndroidNotificationHandler.GCM_SERVER)
.setDebuggerEnabled(true)
connection = new XMPPTCPConnection(config);
connection.setPacketReplyTimeout(10000L);
connection.removeAllStanzaAcknowledgedListeners();
connection.connect();
connection.login(senderId + "@", apiKey);
11:06:11 PM SENT (0): &stream:stream xmlns='jabber:client' to='' xmlns:stream='' version='1.0' xml:lang='en'&
11:06:11 PM RECV (0): &stream:stream from="" id="08EF9F0DE2952851" version="1.0" xmlns:stream="" xmlns="jabber:client"&
11:06:11 PM RECV (0): &stream:features&&mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&&mechanism&X-OAUTH2&/mechanism&&mechan ism&X-GOOGLE-TOKEN&/mechanism&&mechanism&PLAIN&/mechanism&&/mechanisms&&/stream: features&
11:06:11 PM SENT (0): &auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'&ADgzNjA5MjE1Nzk4OUBnY20uZ29vZ2xlYXBpcy5jb20AQUl6YVN5RGNleXFfM DNLNkhsM0RMN2hrWUdlYW1nM3d2d3JzU09V&/auth&
11:06:12 PM RECV (0): &success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/&
11:06:12 PM SENT (0): &stream:stream xmlns='jabber:client' to='' xmlns:stream='' version='1.0' id='08EF9F0DE2952851' xml:lang='en'&
11:06:12 PM RECV (0): &stream:stream from="" id="446DFD7" version="1.0" xmlns:stream="" xmlns="jabber:client"&
11:06:12 PM RECV (0): &stream:features&&bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/&&session xmlns="urn:ietf:params:xml:ns:xmpp-session"/&&/stream:features&
11:06:12 PM SENT (0): &iq id='PPgTi-4' type='set'&&bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'&&resource&Smack&/resource&&/bind&&/iq&
11:06:12 PM RECV (0): &iq id="PPgTi-4" type="result"&&bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"&&jid&/SmackF34A92C9&/jid&&/bind&&/iq&
11:06:12 PM RECV (0):
11:06:12 PM SENT (0): &iq id='PPgTi-6' type='set'&&session xmlns='urn:ietf:params:xml:ns:xmpp-session'/&&/iq&
11:06:12 PM RECV (0): &iq type="result" id="PPgTi-6"/&
11:06:12 PM User logged (0): :5235/SmackF34A92C9
11:06:12 PM XMPPConnection authenticated (0)
11:06:12 PM SENT (0): &iq id='PPgTi-8' type='get'&&query xmlns='jabber:iq:roster'&&/query&&/iq&
11:06:12 PM SENT (0): &presence id='PPgTi-9'&&c xmlns='' hash='sha-1' node='' ver='os2Kusj3WEOivn5n4iFr/ZEO8ls='/&&/presence&
23:06:12,318 DEBUG AndroidNotification com.gamerparentsinc.notification.AndroidNotification - Sending notification, Testing notification for token 123456
11:06:12 PM SENT (0): &message id='PPgTi-10'&&gcm xmlns='google:mobile:data'&{"delay_while_idle":true,"data":{"EmbeddedMessageId" :"messageId-5-400d-92e1-595e","message":"Testing notification"},"time_to_live":10000,"message_id":"messageId-5-400d- 92e1-595e","to":"123456"}&/gcm&&/message&
11:06:12 PM RECV (0): &message&&data:gcm xmlns:data="google:mobile:data"&{"message_id":"messageId-5-400d-92e 1-595e","from":"123456","error_description":"","error":"BAD_REGISTRATION ","message_type":"nack"}&/data:gcm&&/message&
Apr 21, :22 PM org.jivesoftware.smack.roster.Roster$3 processException
SEVERE: Exception reloading roster
org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 10000ms (~10s). Used filter: IQReplyFilter: iqAndIdFilter (AndFilter: (OrFilter: (IQTypeFilter: type=error, IQTypeFilter: type=result), StanzaIdFilter: id=PPgTi-8)), : fromFilter (OrFilter: (FromMatchesFilter (full): null, FromMatchesFilter (bare): , FromMatchesFilter (full): )).
at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackExceptio n.java:106)
at org.jivesoftware.smack.AbstractXMPPConnection$6.run(AbstractXMPPConnection.java :1438)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 (ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Schedu ledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
04/21/15--21:11:
Hi, I am recieving this exception and I really have no idea where to look for the problem, or what may be causing this. If someone can point me in the right direction that would be great. Can someone give me a common reason why this exception would be thrown?
Thanks in advance,
15-Apr-:11.047 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Smack Packet Writer (14)] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Abs tractQueuedSynchronizer.java:2039)
org.jivesoftware.smack.util.ArrayBlockingQueueWithShutdown.take(ArrayBlockingQu eueWithShutdown.java:289)
org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketWriter.nextStreamElement(XMP PTCPConnection.java:1286)
org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketWriter.writePackets(XMPPTCPC onnection.java:1303)
org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketWriter.access$2700(XMPPTCPCo nnection.java:1166)
org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketWriter$1.run(XMPPTCPConnecti on.java:1214)
java.lang.Thread.run(Thread.java:745)
(Page 110)}

我要回帖

更多关于 useing 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信