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

  • Home
  • SEARCH
  • 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 6126019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:19:08+00:00 2026-05-23T16:19:08+00:00

I am trying to code a simple example using the latest version of Smack

  • 0

I am trying to code a simple example using the latest version of Smack (3.2.1) to send and receive messages between two accounts.

Connection connection = new XMPPConnection("jabber.org");
connection.connect();
connection.login("username", "password");

But I can’t even get past the login part. When I run the above code I get this exception:

Exception in thread "main" 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)
at com.smack.TestSmack.main(TestSmack.java:19)

What is going on here? I am sure my username and password work because I can log in using my IM client.

And can anyone point me to current working Smack examples? This is very frustrating because the documentation and the library seem out of sync.

Thanks-

  • 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-05-23T16:19:08+00:00Added an answer on May 23, 2026 at 4:19 pm

    Could you check that you are not adding “@jabber.org” at the end of the username? if you do, it will not work.

    Otherwise, if you do that already, you may want to try using

    SASLAuthentication.supportSASLMechanism("PLAIN", 0);

    before

    connection.login("username", "password");

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

Sidebar

Related Questions

I'm trying to send messages generated by Google Protocol Buffer code via a simple
I'm trying to compile the following simple DL library example code from Program-Library-HOWTO with
I trying to create a pipe using C#. The code is quite simple but
I am trying to write a simple tool using Shoes. This will indent code
I'm trying to develop a simple kernel using TASM, using this code: ; beroset.asm
I'm trying to create a simple WebSocket example using the HTML5/JS API. Based on
I'm trying to get a simple example working using gSoap, for VS2008. I've done
I've been trying to get this really simple example of using AJAX with JQuery
I have some simple example WinForms code which I am trying to translate into
I'm a jQuery beginner. I'm trying to code a very simple using $.get(). The

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.