powered by Jive Software

How to fetch all the users from Openfire

I’m trying to develop a chat client using Smack api with Openfire. I’ve been searching for couple of days on how to retrieve all users from Openfire. I tried adding all the users to a group and tried fetching it :

Roster roster = conn.getRoster();

RosterGroup grp = roster.getGroup("GroupName");

Collection<RosterEntry> ent = grp.getEntries();

for(RosterEntry rosEnt : ent){



But this prints only the current user. I also noticed something called Shared Group but did not know how to create one. Is there a way to fetch all users?

I also tried using


but it gave exception :

Critical Error! The home directory has not been configured,

which will prevent the application from working correctly.

log4j:WARN No appenders could be found for logger (org.jivesoftware.util.JiveGlobals).

log4j:WARN Please initialize the log4j system properly.

Exception in thread “main” java.lang.ExceptionInInitializerError

at org.jivesoftware.openfire.user.UserManager.getInstance(UserManager.java:82)