AnsweredAssumed Answered

XHTMLExtension cannot be cast BoBExtension

Question asked by Simon Lin on Jun 28, 2017
Latest reply on Jun 29, 2017 by Flow

I currently using Smack 4.2.0 for Android, and I'm unable to obtain a BoBExtension send by another client.



<?xml version="1.0" encoding="UTF-8"?>

<message to="to@localhost" from="from@localhost/test"



  <html xmlns="">

    <body xmlns="">


        <img src=""/>







Exception in async packet listener

                                                                                            java.lang.ClassCastException: org.jivesoftware.smackx.xhtmlim.packet.XHTMLExtension cannot be cast to org.jivesoftware.smackx.bob.element.BoBExtension

                                                                                                at org.jivesoftware.smackx.bob.element.BoBExtension.from(

                                                                                                at com.messenger.xmpp.XMPPSession.manageMessageReceived(

                                                                                                at com.messenger.xmpp.XMPPSession.saveMessage(

                                                                                                at com.messenger.xmpp.XMPPSession.access$600(

                                                                                                at com.messenger.xmpp.XMPPSession$3.processStanza(

                                                                                                at org.jivesoftware.smack.AbstractXMPPConnection$ :1164)

                                                                                                at java.util.concurrent.ThreadPoolExecutor.runWorker(

                                                                                                at java.util.concurrent.ThreadPoolExecutor$




A working example can be found in here: mangosta-android/ at master · esl/mangosta-android · GitHub

But I found out that they are using a modified and precompiled version of Smack 4.2.0-beta3.  mangosta-android/app/libs at master · esl/mangosta-android · GitHub