Delete roster entry issue - Urgent!

I can’'t seem to be able to delete someone from my roster.

I’'m doing this:

RosterEntry entry = roster.getEntry("yosdos@jabber.org");

roster.removeEntry(entry);

I’‘m checking entry after i’‘m putting into it roster.getEntry("yosdos@jabber.org"); and it’'s getting null!

I have yosdos@jabber.org on my roster, what can be wrong?

Also, if I log in through Exodus and then delete yosdos@jabber.org, and then log back in through my client, I can still see him on my list!

All of my roster actions seem to not work as they should, except adding a new entry which works fine.

Thank you.

Message was edited by: yossi1771

I can’'t seem to be able to delete someone from my

roster.

I’'m doing this:

RosterEntry entry =

roster.getEntry(“yosdos@jabber.org”);

roster.removeEntry(entry);

I’‘m checking entry after i’'m putting into it

roster.getEntry(“yosdos@jabber.org”); and it’'s

getting null!

First of all, I’'d recommend to check that Smack is receiving this entry from the server. You can open a debugger and/or print all the roster entries to the console in order to check that “yosdos@jabber.org” is in your roster.

Also, if I log in through Exodus and then delete

yosdos@jabber.org, and then log back in through my

client, I can still see him on my list!

Same as above. Check the entries that Smack is receiving from the server.

Regards,

– Gato

Ok,

I don’'t know how, but I can delete users from my roster now. The only problem left for me is getting the presences of the roster users.

I can clearly see the user on my list, and I can see him online but I just keep getting null for his presence.

I don’'t get it.

If you know that a given user is online then Smack will receive the user’‘s presence if you are subscribed to the user’‘s presence. My advice is to open a debugger an check that you are receiving the user’'s presence.

Roster.getPresence(String) will return null if the user is offline or if no presence information is available.

– Gato

Gato,

I know that, but I can’‘t open the smack debugger because i’‘m using a servlet, and for some reason I can’‘t run the servlet when I’'m putting XMPPConnection.DEBUG_ENABLED = true before I create my connection.