Problem while getting connection from wildfire

Hello Friends,

I am trying to connect to wildfire, through my sample smack example… but i am getting XMPPError 502, remote server error,

I have my wildfire server running and i am trying to connect through port 5222. as described.

Do i need to install / run something else as well? what is spark ?? do i need it while using smack with wildfire?

i m pretty new and do not have much idea about the app but it seems interesting and wants to get this working…

below is my sample prog and output.

package cts.smack.test;

import org.jivesoftware.smack.XMPPConnection;

import org.jivesoftware.smack.XMPPException;

/**

  • @author 137137
  • TODO To change the template for this generated type comment go to

  • Window - Preferences - Java - Code Style - Code Templates

*/

public class SampleSmackApp {

public static void main(String[] args) {

try {

XMPPConnection.DEBUG_ENABLED = true;

System.out.println(“HELLO I AM ABOUT TO START”);

XMPPConnection connection = new XMPPConnection(“hyddl0285”,5222);

System.out.println(“Got the XMPP connection”);

connection.login(“chintan”, “hello123”);

System.out.println(“I am able to connect…!!”);

           connection.createChat("harsha@wildfire.com").sendMessage("Howdy!");

System.out.println(“Successfull”);

}

catch(XMPPException xmppe) {

System.out.println(xmppe.getMessage() + " XMPPError: " +

xmppe.getXMPPError().getCode());

System.out.println(“Something is going wrong buddy…!!”);

}

}

}

output:

HELLO I AM ABOUT TO START

XMPPError connecting to hyddl0285:5222. XMPPError: 502

Something is going wrong buddy…!!