First day

I went through Smack documentation, but can some1 suggest me where can i get samples to download and experience the concept.

Is it necessary to access to Just want to clarify as when i ping the server – i get connection time out.

Well the documentation at should give you all you need in order to write some code to connect to a server, login and begin sending messages. is simply one of probably 1000’'s of jabber servers, so no, you dont need to go through them.

If you want, you could download , wildfire and run your own locally or go to for a list of public servers.

You can download any jabber client and use it to connect to any of the servers found above. See here for a list of clients,

Hi Jon,

Thank you for the information,

I am just looking to download a local server app and try to connect to my system only for conversing messages…

I’'ll just go through the links you have provided,

thank you,



Hey chintan,

You may want to look at jive’'s server software then.

It is called Wildfire and can be found here:

If you are not looking to run your own server, then you may want to look at free services around.

You mentioned already. is another one. You can use Spark and any other Jabber client to register to these servers.


Yes cyclone…i did have a look at wildfire and instaleld it as well,

but when my client tries to conenct to wildfire, i am getting remote server error, not sure where to check logs even

can some1 point out what is the mistake??

here is my code and output.

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…!!”);




catch(XMPPException xmppe) {

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


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






XMPPError connecting to hyddl0285:5222. XMPPError: 502

Something is going wrong buddy…!!


i am taking baby steps forward,

my wildfire log indicates that the session is established, but when i send a packet / message for login – its throwing stream error.

Closing session due to bad_namespace_prefix in stream header. Prefix: jabber:client. Connection: socket: Socket[addr=/,port=2364,localport=10015] session: null

can some1 tell me that exactly this means and hwo to get rid of this now…

i’'ll keep debugging…lets see, if i can update the stream header…i know i can not use jabber:client – when i have wildfire installed locally and trying to connect to it from my sample smack client…

waiting for input from you guys…

I’'d make sure you are connecting to the correct address.

Make sure you put the correct information in

new XMPPConnection(address, port)


did you create a new account via a jabber client after wildfire was installed? spark, psi and exodus are very popular on windows. most jabber clients have a “register new account” or “create account” option. my guess is that you are trying to login to an account that has not yet been created.

as an alternative to using a jabber client, since you’'re already familiar with running a command line java program and are getting familiar with smack, you could write a java program to register a new account:

XMPPConnection conn = null;
AccountManager amgr = null;
try {
    conn = new XMPPConnection("hyddl0285");
    amgr = new AccountManager(conn);
    amgr.createAccount("chintan", "hello123");
catch (XMPPException xe) {
    //do something useful with xe