Hi, everyone,
I am having a problem with the Roster class and I just wanted to see if anyone else is experiencing it, and what they are doing with it. (This is a seperate issue from my earlier post.)
It’'s very simple: the roster is showing that all entries have a null presence. (The problem is not that the requested user is not an entry in the roster.) For instance, the following code is embedded in my application:
for (Iterator i=roster.getEntries(); i.hasNext(); ) {
Object entry = i.next();
System.out.println(entry+": +roster.getPresence(((RosterEntry)entry).getName()));
}
I can run two instances of the application at the same time (using different accounts), and have one, both, or no instances of the application print presence information correctly. This problem persists after calls to roster.reload() .
Here’'s what I know about the problem: I know what the correct presence information is through two sources: first, I have a standard client (psi) that is also monitoring the presence information, and second, the application, when working correctly, will print out the expected presence information. I know that the connection is valid because messages sent to that account are received correctly. Finally, I know that this behaviour would be expected if I had not created roster entries correctly, but the above code shows that I am only checking presence of existing entries.
So: have any of you had this problem? If not, I guess, it’‘s a problem in my code, though I’'ve checked it pretty well.
(I should note that I’‘m using Jive Messenger as a server; it might be the problem, I suppose. I’'ll post to their message boards soon.)
Thanks!