Authentication failed - correct username and password

Hello!

I wrote an XMPP client using smack. I’m writing this post because I’m experiencing a strange problem.

If i try to login on my openfire server with a wrong combination of username and password, an exception will inform me that the authentication on the server is failed. In my code I handle this kind of exception, my application shows a popup that inform the user he has to provide correct informations to login. Then if the user tries to connect to the server providing correct informations, the method connection.login() throws the same exception (authentication failed). I’m experiencing this issue only after an incorrect login attemp.

Of course I checked that the information is read properly from the login form.

Does anyone know how to help me?

Thanks in advance!