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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:59:50+00:00 2026-05-29T20:59:50+00:00

I did exactly what the answer suggested ( Asmack not loading VCard ) but

  • 0

I did exactly what the answer suggested ( Asmack not loading VCard ) but it still doesn’t work. The DEBUG output shows that Smack receives the packet with the VCard information but then throws a ClassCastException in https://github.com/rtreffer/smack/blob/master/source/org/jivesoftware/smackx/packet/VCard.java#L548 and all I get is ‘No VCard for xxx@xxx’.

My code:

public VCard getUserVCard() throws XMPPException {
    VCard userVCard = new VCard();
    userVCard.load(connection);
    return userVCard;
}

And some previous initialization:

ConnectionConfiguration config = new ConnectionConfiguration(OF_HOST, OF_PORT, OF_SERVICE_NAME);
config.setDebuggerEnabled(true);
    config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
ProviderManager.getInstance().addIQProvider("vCard ", "vcard-temp", new org.jivesoftware.smackx.provider.VCardProvider());
connection = new XMPPConnection(config);
this.context = context;
try {
    connection.connect();
} catch (XMPPException e) {
    // TODO Auto-generated catch block
        e.printStackTrace();
}

The VCard information in the database is OK – only the final casting fails. Any suggestions?

  • 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-29T20:59:51+00:00Added an answer on May 29, 2026 at 8:59 pm

    I finally decided not only to add the VCardProvider but the whole nine yards in the configuration following this post getSearchForm returns null when using UserSearch in XMPP with aSmack and it worked.

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

Sidebar

Related Questions

I did search but I could not find an answer; When interpreting android accelerometer
This is really confusing me, it just does not want to work. I did
Did you ever had a bug in your code, you could not resolve? I
When I disable my Spinner it looks almost exactly like it did prior to
I've been looking for an answer for about an hour on Google but I
There was an interesting question in a practice test that I did not understand
So I asked something similar yesterday and did receive an answer to my question,
I've been scouring the web and StackOverflow for an answer, but I've found no
I'm trying to use the native2ascii ant task but it seems that is not
I know this topic is bit old, but i did surf the web and

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.