Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8226673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:51:20+00:00 2026-06-07T15:51:20+00:00

I have big problem. Every time when I’m trying to connect to any jabber

  • 0

I have big problem. Every time when I’m trying to connect to any jabber server I have got “SASL authentication DIGEST-MD5 failed” notification. I dont have this error when I dont use JPasswordField, but using JTextField in IM is pointless. I have tried every method I found, but it’s all thesame.

The code:

private void bLoginAction(JTextField login, JPasswordField pass) {
loginText = login.getText();
passText = pass.getPassword().toString();
String[] data = loginText.split("@");
Connection.DEBUG_ENABLED = true;
ConnectionConfiguration config = new ConnectionConfiguration(data[1], 5222);
Connection con = new XMPPConnection(config);
 try {
 con.connect();
 } catch (XMPPException e) {
 e.printStackTrace();
 }
try {
 con.login(loginText, passText);
 } catch (XMPPException e) {
 e.printStackTrace();
 }  
}

Print from printStackTrace():

SASL authentication DIGEST-MD5 failed: invalid-authzid: at
org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:
337) at
org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:203)
at org.jivesoftware.smack.Connection.login(Connection.java:348)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T15:51:22+00:00Added an answer on June 7, 2026 at 3:51 pm

    Don’t use toString(). Try using getPassword() instead as shown here. Even with a JTextField, you should be using getText() instead of toString().

    This is not a smack issue but a straight up Java one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a form with code and I have a big problem. Every element
I have big problem when I am trying to deploy my app over clickonce.
I have a big problem that a recursive treeview doesn't update any childs if
I have a problem where I don't receive notifications every time I push them
Every time I try to connect to my SVN server via XCode, it won't
I'm using editor from Kendo UI, so I have big problem. I don't know
I have a big problem. I use excel auto filter function, at the end
I have a big problem with my app as it crashes often but never
I have a big problem. I had a configuration which worked properly till today.
I have a big problem that is I have implemented a scheduler in my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.