powered by Jive Software

Spurious Presence Packets


I’'m running a Smack based client against the open server at jabber.org. I have a Presence Listener receiving packets of type Presence.Type.Available/Unavailable when users on the roster change status. This all works fine - ie I get one presence packet for each status change.

However, when I point my client to either a Jive Messenger Server or an OpenIm server running on my local box, my client starts constantly receiving hundreds of Available packets when a user on the roster signs in. I’‘m pretty certain this must be a bug in my code, as when I use an Exodus client instead of my home grown one, I don’‘t get the spurious packets. If you could give me any pointers to what I’‘m doing wrong, I’'d be very grateful!

The two pertinent bits of code are :

PresenceListener listener = new PresenceListener();

PacketFilter filter = new PacketTypeFilter(Presence.class);



private class PresenceListener implements PacketListener{

public void processPacket(Packet packet) {

Presence presence = (Presence) packet;

System.out.println("Presence Type : " + presence.getType() + " from " + presence.getFrom());




I’‘d first recommend turning the debugging option on in the involved clients. The debugger’'s info could quickly help you locate the client that is generating the problem. Once you have located the bad client you can try to trace down the specific code that is generating the situation.

Let us know if you need more help.


– Gato