title: openfire smack sending packet 404 error means?
body: <p>when sending packet to openfire using Smack, i get error  remote-server-not-found(404)  . Can anyone please explain what does thet error means? it mean fail to connect to server or the packet has problem?</p>
  
  <pre><code>        PacketFilter responseFilter = new PacketIDFilter(packet.getPacketID());
          PacketCollector response = connection.createPacketCollector(responseFilter);
  
          connection.sendPacket(packet);
  
  
  
          // Wait up to a certain number of seconds for a reply.
          Packet result = response.nextResult(timeout);
  
  
  
          // Stop queuing results
          response.cancel();
  
  
  
          if (result == null) {
              throw new XMPPException("No response from server.");
          }
          else if (result.getError() != null) {  
  
              System.out.println("error:"+result.getError());   //i get error here.... 404
              throw new XMPPException(result.getError());
          }
  </code></pre>
  
  <p>//--- below is how i do connect to openfire  .</p>
  
  <pre><code>        ConnectionConfiguration config = new ConnectionConfiguration("localhost", 5222);
          config.setCompressionEnabled(true);
          config.setSASLAuthenticationEnabled(true);
  
  
  
          XMPPConnection connection = new XMPPConnection(config);
          // Connect to the server
          connection.connect();
          // Log into the server
          connection.login("test", "test","testresource");
  </code></pre>
  
  <p>i attached the xmpp xml that i received from log</p>
  
  <p>sending....</p>
  
  <pre><code>&lt;stream:stream to="localhost" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"&gt;
  &lt;starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/&gt;
  &lt;stream:stream to="xuser" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"&gt;
  &lt;auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;&lt;/auth&gt;
  &lt;response xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;Y2hhcnNldD11dGYtOCx1c2VybmFtZT0idGVzdCIscmVhbG09InpoYW5nIixub25jZT0ieHZacDFOdHlkcld6MVBzOFA0UGlnbWgrbHRieWtyclNYU0NLWVJaRyIsbmM9MDAwMDAwMDEsY25vbmNlPSIxdThheGtJSWgrSzhBLzFBSDRtTHJ5OUxDTE1OSFpBa0xvdlVGcVFGIixkaWdlc3QtdXJpPSJ4bXBwL3poYW5nIixtYXhidWY9NjU1MzYscmVzcG9uc2U9MGE3YzEzOWRkODliZjk5NDcxN2ZiNjQzY2E5NWM3ZDUscW9wPWF1dGgsYXV0aHppZD0idGVzdCI=&lt;/response&gt;
  &lt;stream:stream to="xuser" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"&gt;
  &lt;iq id="CHWuJ-0" type="set"&gt;&lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"&gt;&lt;resource&gt;god&lt;/resource&gt;&lt;/bind&gt;&lt;/iq&gt;
  &lt;iq id="CHWuJ-1" type="set"&gt;&lt;session xmlns="urn:ietf:params:xml:ns:xmpp-session"/&gt;&lt;/iq&gt;
  &lt;compress xmlns='http://jabber.org/protocol/compress'&gt;
  &lt;method&gt;zlib&lt;/method&gt;&lt;/compress&gt;
  &lt;stream:stream to="xuser" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"&gt;
  &lt;iq id="CHWuJ-2" type="get"&gt;&lt;query xmlns="jabber:iq:roster"&gt;&lt;/query&gt;&lt;/iq&gt;
  &lt;presence id="CHWuJ-3"&gt;&lt;/presence&gt;
  &lt;iq id="CHWuJ-4" to="pubsub.my.openfire.server" type="set"&gt;&lt;pubsub xmlns="http://jabber.org/protocol/pubsub"&gt;&lt;create node='TestNode2323'/&gt;&lt;configure&gt;&lt;x xmlns="jabber:x:data" type="submit"&gt;&lt;field var="pubsub#persist_items" type="boolean"&gt;&lt;value&gt;0&lt;/value&gt;&lt;/field&gt;&lt;field var="pubsub#deliver_payloads" type="boolean"&gt;&lt;value&gt;1&lt;/value&gt;&lt;/field&gt;&lt;field var="pubsub#access_model" type="list-single"&gt;&lt;value&gt;open&lt;/value&gt;&lt;/field&gt;&lt;/x&gt;&lt;/configure&gt;&lt;/pubsub&gt;&lt;/iq&gt;
  </code></pre>
  
  <p>receive....</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="xuser" id="d0689fdf" xml:lang="en" version="1.0"&gt;&lt;stream:features&gt;&lt;starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"&gt;&lt;/starttls&gt;
  &lt;mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;&lt;mechanism&gt;PLAIN&lt;/mechanism&gt;&lt;mechanism&gt;CRAM-MD5&lt;/mechanism&gt;&lt;mechanism&gt;ANONYMOUS&lt;/mechanism&gt;&lt;mechanism&gt;DIGEST-MD5&lt;/mechanism&gt;&lt;/mechanisms&gt;&lt;compression xmlns="http://jabber.org/features/compress"&gt;&lt;method&gt;
  zlib&lt;/method&gt;&lt;/compression&gt;&lt;auth xmlns="http://jabber.org/features/iq-auth"/&gt;&lt;register xmlns="http://jabber.org/features/iq-register"/&gt;&lt;/stream:features&gt;&lt;proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/&gt;
  &lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="xuser" id="d0689fdf" xml:lang="en" version="1.0"&gt;&lt;stream:features&gt;&lt;mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;
  &lt;mechanism&gt;PLAIN&lt;/mechanism&gt;&lt;mechanism&gt;CRAM-MD5&lt;/mechanism&gt;&lt;mechanism&gt;ANONYMOUS&lt;/mechanism&gt;&lt;mechanism&gt;DIGEST-MD5&lt;/mechanism&gt;&lt;/mechanisms&gt;&lt;compression xmlns="http://jabber.org/features/compress"&gt;&lt;method&gt;zlib&lt;/method&gt;&lt;/compression&gt;
  &lt;auth xmlns="http://jabber.org/features/iq-auth"/&gt;&lt;register xmlns="http://jabber.org/features/iq-register"/&gt;&lt;/stream:features&gt;
  &lt;challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;
  cmVhbG09InpoYW5nIixub25jZT0ieHZacDFOdHlkcld6MVBzOFA0UGlnbWgrbHRieWtyclNYU0NLWVJaRyIscW9wPSJhdXRoIixjaGFyc2V0PSJ1dGYtOCIsYWxnb3JpdGhtPSJtZDUtc2VzcyI=&lt;/challenge&gt;
  &lt;success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;
  cnNwYXV0aD1jOWIyOWIxYTMwN2Q5ZjdkYmZiOGM4MDBkMTU4OWFmZQ==&lt;/success&gt;
  &lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="xuser" id="d0689fdf" xml:lang="en" version="1.0"&gt;&lt;stream:features&gt;&lt;compression xmlns="http://jabber.org/features/compress"&gt;&lt;method&gt;zlib&lt;/method&gt;&lt;/compression&gt;&lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/&gt;&lt;session xmlns="urn:ietf:params:xml:ns:xmpp-session"/&gt;&lt;/stream:features&gt;
  &lt;iq type="result" id="CHWuJ-0" to="xuser/d0689fdf"&gt;&lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"&gt;&lt;jid&gt;test@xuser/god&lt;/jid&gt;&lt;/bind&gt;&lt;/iq&gt;
  &lt;iq type="result" id="CHWuJ-1" to="test@xuser/god"&gt;&lt;session xmlns="urn:ietf:params:xml:ns:xmpp-session"/&gt;&lt;/iq&gt;
  &lt;compressed xmlns='http://jabber.org/protocol/compress'/&gt;
  &lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="xuser" id="d0689fdf" xml:lang="en" version="1.0"&gt;&lt;stream:features&gt;&lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/&gt;&lt;session xmlns="urn:ietf:params:xml:ns:xmpp-session"/&gt;&lt;/stream:features&gt;
  &lt;iq type="result" id="CHWuJ-2" to="test@xuser/god"&gt;&lt;query xmlns="jabber:iq:roster"&gt;&lt;item jid="test" name="test" subscription="none"/&gt;&lt;/query&gt;&lt;/iq&gt;
  &lt;iq type="error" id="CHWuJ-4" to="test@xuser/god" from="pubsub.my.openfire.server"&gt;&lt;pubsub xmlns="http://jabber.org/protocol/pubsub"&gt;&lt;create node="TestNode2323"/&gt;&lt;configure&gt;&lt;x xmlns="jabber:x:data" type="submit"&gt;&lt;field var="pubsub#persist_items" type="boolean"&gt;&lt;value&gt;0&lt;/value&gt;&lt;/field&gt;&lt;field var="pubsub#deliver_payloads" type="boolean"&gt;&lt;value&gt;1&lt;/value&gt;&lt;/field&gt;&lt;field var="pubsub#access_model" type="list-single"&gt;&lt;value&gt;open&lt;/value&gt;&lt;/field&gt;&lt;/x&gt;&lt;/configure&gt;&lt;/pubsub&gt;&lt;error code="404" type="cancel"&gt;&lt;remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/&gt;&lt;/error&gt;&lt;/iq&gt;
  </code></pre>
  
  <p>Intepreted..</p>
  
  <pre><code>&lt;iq id="CHWuJ-0" to="xuser/d0689fdf" type="result"&gt;&lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"&gt;&lt;jid&gt;test@xuser/god&lt;/jid&gt;&lt;/bind&gt;&lt;/iq&gt;
  &lt;iq id="CHWuJ-1" to="test@xuser/god" type="result"&gt;&lt;/iq&gt;
  &lt;iq id="CHWuJ-2" to="test@xuser/god" type="result"&gt;&lt;query xmlns="jabber:iq:roster"&gt;&lt;item jid="test" name="test" subscription="none"&gt;&lt;/item&gt;&lt;/query&gt;&lt;/iq&gt;
  &lt;iq id="CHWuJ-4" to="test@xuser/god" from="pubsub.my.openfire.server" type="error"&gt;&lt;pubsub xmlns="http://jabber.org/protocol/pubsub"&gt;&lt;create node='TestNode2323'/&gt;&lt;configure xmlns="http://jabber.org/protocol/pubsub"&gt;&lt;value&gt;0&lt;/value&gt;&lt;/configure&gt;&lt;/pubsub&gt;&lt;error code="404" type="CANCEL"&gt;&lt;remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/&gt;&lt;/error&gt;&lt;/iq&gt;
  </code></pre>