powered by Jive Software

Problems with aSMACK file transfer

I’ve been trying to bring file transfer capabilities into my mobile client and have been running into major issues. I’ve pretty much followed the code example here http://harryjoy.com/2012/08/18/file-transfer-in-android-with-asmack-and-openfire /

For Sending a file, I’m getting this

E/AndroidRuntime( 3756): FATAL EXCEPTION: File Transfer jsi_20634193635998184

E/AndroidRuntime( 3756): java.lang.ClassCastException: org.jivesoftware.smack.ut

il.PacketParserUtils$UnparsedResultIQ cannot be cast to org.jivesoftware.smackx.

bytestreams.socks5.packet.Bytestream

E/AndroidRuntime( 3756): at org.jivesoftware.smackx.bytestreams.socks5.So

cks5BytestreamManager.determineStreamHostInfos(Socks5BytestreamManager.java:611)

E/AndroidRuntime( 3756): at org.jivesoftware.smackx.bytestreams.socks5.So

cks5BytestreamManager.establishSession(Socks5BytestreamManager.java:445)

E/AndroidRuntime( 3756): at org.jivesoftware.smackx.filetransfer.Socks5Tr

ansferNegotiator.createOutgoingStream(Socks5TransferNegotiator.java:57)

E/AndroidRuntime( 3756): at org.jivesoftware.smackx.filetransfer.FaultTol

erantNegotiator.createOutgoingStream(FaultTolerantNegotiator.java:145)

E/AndroidRuntime( 3756): at org.jivesoftware.smackx.filetransfer.Outgoing

FileTransfer.negotiateStream(OutgoingFileTransfer.java:383)

E/AndroidRuntime( 3756): at org.jivesoftware.smackx.filetransfer.Outgoing

FileTransfer.access$100(OutgoingFileTransfer.java:35)

E/AndroidRuntime( 3756): at org.jivesoftware.smackx.filetransfer.Outgoing

FileTransfer$2.run(OutgoingFileTransfer.java:216)

E/AndroidRuntime( 3756): at java.lang.Thread.run(Thread.java:856)

and for recieving, I’m getting this

FATAL EXCEPTION: File Transfer jsi_904966237490336963

E/AndroidRuntime( 3377): java.lang.NullPointerException

E/AndroidRuntime( 3377): at org.jivesoftware.smackx.filetransfer.Incoming

FileTransfer.negotiateStream(IncomingFileTransfer.java:179)

E/AndroidRuntime( 3377): at org.jivesoftware.smackx.filetransfer.Incoming

FileTransfer$1.run(IncomingFileTransfer.java:124)

E/AndroidRuntime( 3377): at java.lang.Thread.run(Thread.java:856)

Any ideas or advice?