powered by Jive Software

Openfire 3.10 userService.addRoster does not add the user to the database

In UserServiceLegacy.java

plugin.addRosterItem(username, rosterUserJid, rosterUserNick, null, null);

and in the plugin UserServicePlugin.java

RosterItem ri = r.createRosterItem(j, itemName, groups, true, true);

The createRosterItem method has the following line of code in it…

  • @param push True if the new item must be push to the user.

__ * @param persistent True if the new roster item should be persisted to the DB.__

  • @param groups The list of groups to assign this roster item to (can be null)


public RosterItem createRosterItem(JID user, String nickname, List groups**, boolean push,**

boolean persistent)

The problem is that even when the parameter ‘persistent’ is set to true, the db still does not get updated with this information.

Note this used to work on older Openfire version but stopped working once Openfire was upgraded to 3.10.

Any ideas on what is wrong and how this can be solved ? Let me know if any more information/logs are required.

Can anyone give any pointers please ? Does this have something to do with Openfire version 3.10. On this website its reccomended to use Openfire 4.0 which has the new REST API for userService. We cannot upgrade Openfire immediately. Thoughts ?