title: can not identify the cause of error to connect xampp (openfire) server by java
body: <p>I am new in xmpp. For a whole day i and my project member stuck in connecting  xmpp server(openfire version 3.9.3) by java. I am using smack(version 4.0.7) library. Here is simple code...</p>
  
  <pre><code>        ConnectionConfiguration config =new ConnectionConfiguration("servername",5223);
          XMPPTCPConnection connection = new XMPPTCPConnection(config);
              // Connect to the server
              try {
                      connection.connect();
                  connection.login("username", "password");
  
                  }  catch (IOException e) {
                      e.printStackTrace();
                  } catch (XMPPException e) {
                      e.printStackTrace();
                  } catch (SmackException e) {
                      e.printStackTrace();
                  } 
  </code></pre>
  
  <p>But when i run this code this errors is showing ...`</p>
  
  <pre><code> org.jivesoftware.smack.SmackException$NoResponseException
  at org.jivesoftware.smack.XMPPConnection.throwConnectionExceptionOrNoResponse(XMPPConnection.java:548)
  at org.jivesoftware.smack.tcp.XMPPTCPConnection.throwConnectionExceptionOrNoResponse(XMPPTCPConnection.java:867)
  at org.jivesoftware.smack.tcp.PacketReader.startup(PacketReader.java:113)
  at org.jivesoftware.smack.tcp.XMPPTCPConnection.initConnection(XMPPTCPConnection.java:482)
  at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:440)
  at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:811)
  at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:396)
  at test.third.&lt;init&gt;(third.java:19)
  at test.third.main(third.java:34)
  </code></pre>
  
  <p>There may be a silly mistake and easy solution, i googled but but somehow i am not getting the right solution.please help me. Thanks in advance</p>