title: item-not-found(404) in sending file(Image) using ASMACK android
body: <p>I am trying to send image file in my chat application . i am using asmack-android-8-4.0.6.jar .Log in and normal messaging works great but i am not able to send image . There is no fatal exception but i always get item-not-found(404) message I am using following code</p>
  
  <pre><code> public void sendFile(String picturePath, String to)
  {
                  CustomLogger.showLog("Bitmap", "path is " + picturePath);
                  CustomLogger.showLog("Bitmap", "path is " + to);
                  if (xmppConnection == null)
                  {
                      CustomLogger.showLog("Service", "connection is null while sending image");
                  }
                  else
                  {
                      CustomLogger.showLog("Service", "connection is not null while sending image");
                      FileTransferNegotiator.setServiceEnabled(xmppConnection, true);
                      manager = new FileTransferManager(xmppConnection);
                      manager.addFileTransferListener(this);
                      OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer(to + "/sc");
                      File file = new File(picturePath);
  
                      try
                      {
                         transfer.sendFile(file, "test_file");
                      } catch (Exception e)
                      {
                          CustomLogger.showLog("Bitmap", "Exception in sending file");
                          e.printStackTrace();
                      }
                      while (!transfer.isDone())
                      {
                          if (transfer.getStatus().equals(FileTransfer.Status.error))
                          {
                              CustomLogger.showLog("Bitmap", "ERROR!!! " + transfer.getError());
                          }
                          else if (transfer.getStatus().equals(FileTransfer.Status.cancelled)
                                  || transfer.getStatus().equals(FileTransfer.Status.refused))
                          {
                              CustomLogger.showLog("Bitmap", "Cancelled!!! " + transfer.getError());
                          }
                          try
                          {
                              Thread.sleep(1000L);
                          } catch (InterruptedException e)
                          {
                              e.printStackTrace();
                          }
                      }
  
                      if (transfer.getStatus().equals(FileTransfer.Status.refused) || transfer.getStatus().equals(FileTransfer.Status.error)
                              || transfer.getStatus().equals(FileTransfer.Status.cancelled))
                      {
                          CustomLogger.showLog("Bitmap", "refused cancelled error " +""+transfer.getError()+"  " + transfer.getException());
                          transfer.getException().printStackTrace();
                      }
                      else
                      {
                          CustomLogger.showLog("Bitmap", "Success in sending");
                      }
                  }
              }
  </code></pre>
  
  <p>And the stack trace is</p>
  
  <pre><code>item-not-found
  W/System.err﹕ at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:196)
  W/System.err﹕ at org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager.establishSession(Socks5BytestreamManager.java:493)
  W/System.err﹕ at org.jivesoftware.smackx.filetransfer.Socks5TransferNegotiator.createOutgoingStream(Socks5TransferNegotiator.java:63)
  W/System.err﹕ at org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer.negotiateStream(OutgoingFileTransfer.java:386)
  W/System.err﹕ at org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer.access$100(OutgoingFileTransfer.java:35)
  W/System.err﹕ at org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer$2.run(OutgoingFileTransfer.java:220)
  W/System.err﹕ at java.lang.Thread.run(Thread.java:841)
  </code></pre>
  
  <p>Any help will be greatly appreciated</p>