powered by Jive Software

Login Problem with smack ASL failed

I found an older threat dealing with a login method … but couldn’‘t reply there so here’'s the new threat.

My code snippet is as following:

package Chat;

import org.jivesoftware.smack.*;

public class Login {

public static void main(String[] args) {

try {

XMPPConnection connection = new XMPPConnection(“jabber.org”, 5222);


} catch (Exception e) {

System.out.println("Failed : " + e);




Failed : SASL authentication failed:


Hi Flo,

a threat you’'re talking away? Probably it was a thread you found? Are you using a JRE or the JDK-JRE (C:\Program Files\Java\jdk1.5.0_06\jre) to run your program?

Does your classpath contains the Smack jars or are you using Smack java files to run your program?


I got the same problem! Anyone coule solve it? I am depressed !

Hello it2000

I’'m using jre1.5.0_06 in addition I wrote that code on my own ( with help of this forum ).

I imported the smack/smackx/smackx-debugging *.jar files as libraries into the project of that class.

Maybe this could help you to fix my problem.


I can’'t try to use the JRE of the JDK for you … this could solve the problem. If the JDK does not help, try to run it not within Eclipse, this could also help.


Thank you for that.

Hmm…I tried the same code with another Jabber Server -worked.

I will continue working on that problem. If i can fix that problem with the jabber Server, I will post it right here.

take care. Flo

worked finally with another server.

I tried another server

XMPPConnection connection = new XMPPConnection(“talk.google.com”, 5222, “gmail.com”);


The problem also exists:

Failed : SASL authentication failed:

Another question: in the above case,I have to add the parameter “gmail.com”, I don’'t know why!

Anyone could help me?