| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1675 人关注过本帖
标题:muleESB使用smack包连接ejabberd的问题
取消只看楼主 加入收藏
ninggang
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:637
专家分:0
注 册:2006-11-1
结帖率:40%
收藏
 问题点数:0 回复次数:0 
muleESB使用smack包连接ejabberd的问题
1.环境:muleESB版本3.3.1。里面集成了smack包,smack包版本为3.1.0;操作系统:windows.
2.mule-config.xml配置
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www. xmlns:xsi="http://www.
    xmlns:spring="http://www. xmlns:xmpp="http://www.
    xmlns:stdio="http://www.
    xsi:schemaLocation="http://www.
                     http://www.        
                     http://www. http://www.        
                     http://www. http://www.
                     http://www. http://www.
  
    <xmpp:connector name="xmppConnector" host="
        user="admin" password="admin" />
    <stdio:connector name="stdioConnector"
        messageDelayTime="1234" outputMessage="" promptMessage="please Enter:"
        promptMessageCode="456" />
    <flow name="flow">
        <stdio:inbound-endpoint system="IN"
            connector-ref="stdioConnector" />
        <all>
            <processor-chain>
                <stdio:outbound-endpoint system="OUT"
                    connector-ref="stdioConnector" />
                 <xmpp:outbound-endpoint type="CHAT" recipient="XXX@ />
            </processor-chain>
        </all>
    </flow>        
     
</mule>
最开始报错
  java.lang.NullPointerException
    at org.jivesoftware.smack.util.Base64.encodeBytes(Base64.java:636)
    at org.jivesoftware.smack.sasl.SASLMechanism.challengeReceived(SASLMechanism.java:152)
    at org.jivesoftware.smack.SASLAuthentication.challengeReceived(SASLAuthentication.java:492)
    at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:338)
    at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
    at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:76)
   方法:修改SASLMechanism.java:152的源码,重新编译,将原来的class做替换,重新build
     String authenticationText = null;
     if(null != response) {
    authenticationText = Base64.encodeBytes(response,Base64.DONT_BREAK_LINES);
     }
     if((null == authenticationText) || (authenticationText.equals(""))) {
    authenticationText = "=";
     }
     虽然空指针异常没有了。但是重启mule-server
 Exception stack is:
     1. No response from the server. (org.jivesoftware.smack.XMPPException)
        org.jivesoftware.smack.SASLAuthentication:430 (null)
     2. No response from the server. (org.mule.retry.RetryPolicyExhaustedException)
        org.mule.retry.policies.AbstractPolicyTemplate:105 (http://www.)
     --------------------------------------------------------------------------------
     Root Exception stack trace:
     No response from the server.:
    at org.jivesoftware.smack.SASLAuthentication.bindResourceAndEstablishSession(SASLAuthentication.java:430)
    at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:331)
    at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:395)
      + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)

现在没招了。不知道有童鞋有这段经历没?
搜索更多相关主题的帖子: version 操作系统 
2013-05-02 15:36
快速回复:muleESB使用smack包连接ejabberd的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025502 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved