Smack Wildfire connection problems


I am attempting to write a small proof of concept which will test if a java class can create a connection to a wildfire server. I am using Smack 2.2.1 and Wildfire 3.0.1. I am compiling and running the two java classes below from the command line.

package testchat;

import org.jivesoftware.smack.*;

public class IMChat{

public IMChat(){


XMPPConnection.DEBUG_ENABLED = true;

XMPPConnection conn = new XMPPConnection(“dev1”,5269);


           Chat chat = conn.createChat("");

chat.sendMessage(“Hey, how’'s it going?”);

}catch(XMPPException ex){System.out.println(ex.getMessage());}



import testchat.*;

public class Test{

public Test(){

IMChat imchat = new IMChat();


public static void main(String[] args){

Test test = new Test();



The command prompt displays:

stream:error (host-unknown)

and the log in wildfire displays:

2006.08.16 17:28:02 [ :104)

] Connection closed before session established


It seems like some sort of a connection is being made since wildfire is logging the connection attempt. This is all being run on the same machine. Any suggestions on what I might be doing wrong?



You’'re trying to connect as a client to the server-to-server port (5269). Try using the client port, 5222.

Thanks that worked.