powered by Jive Software

Class cast exception in FileTransferNegotiator

I am using smack/smackx (which was bundled with the Mobicents XMPP resource adaptor 2.2.0-SNAPSHOT)

When I try transferring a file, the receiving client (Pidgin) gets the request properly and pops up

a confirmation message and asks which directory to story the file in.

Alas, I get a class cast exception in the Java class FileTransferNegotiator in the method

negotiateOutingTransfer in this section of code:

IQ iqResponse = (IQ) siResponse;
if (iqResponse.getType().equals(IQ.Type.RESULT)) {
System.out.println(“LB problem here watch…”);
StreamInitiation response = (StreamInitiation) siResponse;
System.out.println(“This does not print…”);
return getOutgoingNegotiator(getStreamMethodField(response


My error log looks like

2010-10-01 11:00:43,518 INFO [STDOUT] (pool-23-thread-1) LB problem here watch…
2010-10-01 11:00:43,518 ERROR [javax.slee.RAEntityNotification[entity=XMPPRA].XmppResourceAdaptor] (pool-23-thread-1) throwing java.lang.ClassCastException: org.jivesoftware.smack.PacketReader$4 cannot be cast to org.jivesoftware.smackx.packet.StreamInitiation

Has anybody else encountered this problem? What should I do to get around it.