powered by Jive Software

Empty roster, what am i doing wrong?

Hello, I have installed and configured openfire 4.2.1.
All clients which I tried (pidgin, gajim, IM+) work fine and display contact list properly.
But when I try using the smack 4.2.2 to get contacts list, it turns out empty.

Source code for the test:

The test output:
Configure connection
Create connection
Log in
List roster
Num entries 0
Num groups 0
Close connection

He Roster may not be loaded right after login(), I suggest to use a roster loaded listener: https://download.igniterealtime.org/smack/docs/latest/javadoc/org/jivesoftware/smack/roster/Roster.html#addRosterLoadedListener-org.jivesoftware.smack.roster.RosterLoadedListener-

Thank you. It’s working.