Comments (15)
The sysout is caused by
http://github.com/rtreffer/smack/blob/master/source/org/jivesoftware/smackx/pack
et/VCard.java#L540
You ran into a ClassCastException on
result = (VCard)
collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
This means that the collector received an response but couldn't build a
package. A
common symptom for a missing PacketExtension. "vCard" in the "vcard-temp"
namespace
has to be associated with a vCard-parser.
https://svn.igniterealtime.org/svn/repos/smack/trunk/build/resources/META-INF/sm
ack.providers
<iqProvider>
<elementName>vCard</elementName>
<namespace>vcard-temp</namespace>
<className>org.jivesoftware.smackx.provider.VCardProvider</className>
</iqProvider>
In code:
ProviderManager.getInstance().addIQProvider("vCard", "vcard-temp", new
org.jivesoftware.smackx.provider.VCardProvider());
Have fun!
Original comment by [email protected]
on 11 May 2010 at 10:46
- Changed state: Done
from asmack.
Set do DONE because I think it's that problem. please reopen and provide more
information if I'm wrong.
Original comment by [email protected]
on 12 May 2010 at 6:42
from asmack.
Thank you, that solved the issue :)
I think that this suggestion should be added to the javadoc of the VCard class.
Bye!
Original comment by [email protected]
on 12 May 2010 at 8:47
from asmack.
Please help me, i have the same issue, but inserting line
ProviderManager.getInstance().addIQProvider("vCard", "vcard-temp", new
org.jivesoftware.smackx.provider.VCardProvider());
nothing changes. Where should I put this string,before connection.connnect() or
just before vCard.load(connection) ???
thanks in advance!
Original comment by [email protected]
on 19 Sep 2010 at 1:37
from asmack.
Im unable to get Friends profile picture using this.. can anyone please list
out the steps what to do ?
I am getting same error as was mentioned above.
Original comment by [email protected]
on 27 Dec 2010 at 1:26
from asmack.
I met the same issue which was resolved by adding the VCardProvider. Thank you
rtreffer!
Original comment by [email protected]
on 3 Mar 2011 at 1:41
from asmack.
When I call vcard.getAvatar, the resulting array is not a picture of the array.
How to get friends pictures? Please help,Thanks.
Original comment by [email protected]
on 17 May 2011 at 8:05
from asmack.
[deleted comment]
from asmack.
@[email protected] Thanks a lot.
It works pretty well when I added
ProviderManager.getInstance().addIQProvider("vCard", "vcard-temp", new
org.jivesoftware.smackx.provider.VCardProvider());
before
vcard.load(this.connection, user);
Original comment by [email protected]
on 15 Dec 2011 at 7:57
from asmack.
I used the code
ProviderManager.getInstance().addIQProvider("vCard", "vcard-temp", new
org.jivesoftware.smackx.provider.VCardProvider());
but it still doesn't work, any help?
Original comment by [email protected]
on 30 May 2013 at 10:47
from asmack.
[deleted comment]
from asmack.
Adding the IQProvider DOESN'T work for me too.
ProviderManager.getInstance().addIQProvider("vCard", "vcard-temp", new
org.jivesoftware.smackx.provider.VCardProvider());
I'm getting this in logcat:
SENT (1102292544): <iq id="2hh9b-8" from="[email protected]/Smack"
type="get"><vCard xmlns='vcard-temp'/></iq>
RCV (1102292544): <iq id='2hh9b-8' type='error'
to='[email protected]/Smack'><error type='cancel'><item-not-found
xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
I/System.out(14075): No VCard for [email protected]/Smack
E/AndroidRuntime(14075): java.lang.NullPointerException: expected receiver of
type org.jivesoftware.smackx.packet.VCard, but got null
Original comment by [email protected]
on 5 Aug 2013 at 12:32
from asmack.
Hi I am using 'asmack:asmack:8-4.0.2' and while loading the vcard with null
Avatar it crashes the App with following error
java.lang.ClassCastException: org.jivesoftware.smack.util.PacketParserUtils$2 cannot be cast to org.jivesoftware.smackx.vcardtemp.packet.VCard
at org.jivesoftware.smackx.vcardtemp.packet.VCard.doLoad(VCard.java:560)
at org.jivesoftware.smackx.vcardtemp.packet.VCard.load(VCard.java:542)
Although the same App with no changes in it works fine when Avatar is set to
something.
Don't know how to fix above solution doesn't work.
Thanks
Original comment by [email protected]
on 9 Oct 2014 at 5:12
from asmack.
any one with a solution for this :
java.lang.ClassCastException: org.jivesoftware.smack.util.PacketParserUtils$2 cannot be cast to org.jivesoftware.smackx.vcardtemp.packet.VCard
at org.jivesoftware.smackx.vcardtemp.packet.VCard.doLoad(VCard.java:560)
at org.jivesoftware.smackx.vcardtemp.packet.VCard.load(VCard.java:542)
Original comment by [email protected]
on 7 Nov 2014 at 7:23
from asmack.
I just Got it worked when i changed my code here
ProviderManager.getInstance().addIQProvider("vCard", "vcard-temp", new
VCardProvider()); to ProviderManager.getInstance().addIQProvider("vCard",
"vcard-temp:x:update", new VCardProvider());
Original comment by [email protected]
on 9 Feb 2015 at 6:52
from asmack.
Related Issues (20)
- conn.getAccountManager().deleteAccount() - No response from server in AccountManager.java:304 HOT 1
- Adding contacts with "_" or "|" to Roster doesn't work
- build errors on ubuntu10.4
- Obfuscation with Proguard requires changing previously working code HOT 1
- Getting offline messages HOT 6
- TLS is supported?
- Can't Send Messages
- Questions about Android Device 3G to WiFi transition issues
- Connection broken HOT 2
- MultiUserChat: getting Collection<Affiliate> produces error in getMembers / getModerators etc...
- FileTransfer doesn't work
- can't connect to server ec2 of amazon with android 3.x or 4.x
- No response from server while creating node / publishing to node
- Problem in FileTransfer . i am using xmpp and openfire as server. HOT 1
- Connection states get invalid
- ERROR/XMPPClient(389): SASL authentication failed using mechanism DIGEST-MD5: and connConfig.setSASLAuthenticationEnabled(false); HOT 2
- File Transfer Error
- File transfer is not work properly
- Recived IQ is broken
- MultiUserChat.addInvitationListener(conn, "") throws nullpointerexception when reconnecting HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asmack.