powered by Jive Software

Can somebody else help me the relogin error?

Hi,

I think Spark is so cool,so I try to write an other imitational IM client using the Smack api(2.2.0),and use the wildfire 2.6.1 as server.Now I use the swt(an java language which write by the eclipse team) to write a login interface,but if I key in the right usrname and wrong password first,Smack tell me:SASL authentication failed: ,but the second time I key in the right usename and rihgt password,it tell me the same error:SASL authentication failed,and I can not login again no matter what I try more times,Smack always tell me the same error.so I want to now why,can you help me ?Thank you very much

The code is:

try{

XMPPConnection con = new XMPPConnection(“XXXXX”);

con.login(“benson”, “XXXXX”);

}

catch(XMPPException e)

{

e.printStackTrace();

}

The error is:

SASL authentication failed:

at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 205)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:410)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:374)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:355)

Message was edited by: benson

Hi,

It seems your jabber domain (xmppConnection param) and/or your login/pwd (used in the xmppConnection.login method) are wrong!

e07

I do not think so,because I can login sucessfully if I use right name and password at the beginning,just when I login the wrong password,and after that,ever I use correct password,I can not login agian

In your catch block try to close the connection object.

catch(XMPPException e)

{

con.close();

e.printStackTrace();

}

HTH.

thank you,and I have seen the smack source code and find the result,and if I new a connection every time,than will be OK think the smack maybe should change some code about SASLAuthentication.java or XMMPConnction.java,because you can not ask people to new a connection every time,if you connection the server,you just need do the login.So I think that,maybe somebody else do not agree me,and that is OK.

I just give some suggestions.Thank you.

cc

dd