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 8323515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:44:36+00:00 2026-06-08T23:44:36+00:00

I am trying to connect with ejabber using BOSH Manager in android with the

  • 0

I am trying to connect with ejabber using BOSH Manager in android with the help of asmack library.

but i am getting following error.

Caused by: java.lang.IllegalStateException: Not logged in to server.
    at org.jivesoftware.smack.Roster.reload(Roster.java:197)
    at org.jivesoftware.smack.BOSHConnection.login(BOSHConnection.java:351)
    at org.jivesoftware.smack.Connection.login(Connection.java:353)
    at com.bcl.BoradCastLocationActivity$StartXMPPConnection.doInBackground(BoradCastLocationActivity.java:75)
    at com.bcl.BoradCastLocationActivity$StartXMPPConnection.doInBackground(BoradCastLocationActivity.java:1)
    at android.os.AsyncTask$2.call(AsyncTask.java:185)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
    ... 4 more

and here is my code

SASLAuthentication.registerSASLMechanism("DIGEST-MD5",SASLDigestMD5Mechanism.class);
SASLAuthentication.supportSASLMechanism("DIGEST-MD5", 1);

System.setProperty("smack.debugEnabled", "true");
XMPPConnection.DEBUG_ENABLED = true;
SmackConfiguration.setPacketReplyTimeout(6000);
BOSHConfiguration bconfig = new
         BOSHConfiguration(false, "example.com", 5280, "/xmpp-http-bind/", "example.com");

bconfig.setSASLAuthenticationEnabled(true);
BOSHConnection xmpp = new BOSHConnection(bconfig);

 xmpp.connect();
 xmpp.login("username","password"); // HERE I AM GETTING AN ERROR
  • 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-08T23:44:37+00:00Added an answer on June 8, 2026 at 11:44 pm

    A glance at the aSmack sources indicated that this an an bug. A quick workaround is to to call Configuration.setRosterLoadedAtLogin(false), a fix would include moving 3 lines from BOSHConnection.java:350 after the line authenticated = true;.

    I have made the changes in aSmack, please run build.bash and use the generated .jar.

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

Sidebar

Related Questions

I'm trying to connect to a FTP using Apaches FTPSClient but I keep getting
Trying to connect to a SQL Server 2005 instance remotely but getting the following
Im trying to connect mysql with android but it throw me an error. Error
I am trying to connect to node.js websocket using unitt ios client. But it
I'm trying to connect to https url - https://rtpubcommission.api.cj.com/wsdl/version2/realtimeCommissionServiceV2.wsdl But getting the errors (listed
i am trying to connect with sql server 2008 using java connection string but
When trying to connect to EC2 over SSH I get the following error: joshua-scotts-macbook-pro:.ec2
When trying to connect to a web service using the following $client = new
I am trying to connect to Postgre using a PHP script, but it returns
I'm trying to connect to Amazon EC2 using OpenSSH in windows but I need

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.