Below is my client test result using smack-4.1.0-beta2-SNAPSHOT-2015-01-14:
Debugging/single-stepping into the receiveFile, I have observed streamNogotiatorTask.get(..) throws an ExecutionException "Error in execution". Depth-wise on the stack frame, it looks like there is NullPointerException down in Sock5TransferNegotiator, "Cannot evaluate org.jivesoftware.smackx.filetransfer.Socks5TransferNegotiator$BytestreamSIDFilt er.toString()". Also, a similar kind of problem for In-band was observed.
To contrast, when using PSI client to receive file, PSI can negotiate and receive both XEP-0047 In-Band Bytestrean or XEP-0065 SOCKS5 without error. Of course PSI is not a Smack implementation but the fact that beta2 cannot handle receiving a file provides additional proof there is problem with the receiveFile(..) implementation of Smack or there is a problem with my implementation.
- My sender and receiver processes are executing on the same machine.
- XMPP Server is Openfire 3.6.3 and is not running on the same machine as the (clients)
My beta2 client calls receiveFile:
- public void recieveFile(final File file) throws SmackException, IOException
receiveFile then calls negotiateStream:
- private InputStream negotiateStream() throws SmackException, XMPPErrorException
streamNegotiatorTask.run();
InputStream inputStream;
try {
inputStream = (InputStream)streamNegotiatorTask.get(15L, TimeUnit.SECONDS);
} catch (InterruptedException var10) {
throw new SmackException("Interruption while executing", var10);
} catch (ExecutionException var11) {
throw new SmackException("Error in execution", var11); // <<=== Fails to receive file, throws here
} catch (TimeoutException var12) {
throw new SmackException("Request timed out", var12);
} finally {
streamNegotiatorTask.cancel(true);
}