powered by Jive Software

Roster<init> - NullPointerException

Hello all

I am running Wildfire 3.2.0.

I am trying to add roster items to users, and I get the following:

–> Processing roster for user xxx

Exception in thread “main” java.lang.NullPointerException

at org.jivesoftware.wildfire.roster.Roster.(Roster.java:84)

at my.pkg.wildfire.UserMgmt.addRosterToUsers(UserMgmt.java:85)

at CtlWU.main(CtlWU.java:27)

The error happens when the Roster constructor is called.

Code is at http://pastebin.ca/356840

Thank you.

Hey chapeaurouge,

I just modified the source code so that the constructor is no longer public. Instead you should use RosterManager#getRoster that checkes in the cache before creating a new roster.

Anyway, the problem in your case is that you are not starting up the server and instead just starting up your application and try to use Wildfire’'s API. You should add your code as a plugin of the server instead. Read the Plugin Developer Guide for more information. Or check out the Build Wildfire with Eclipse if you want to compile the server from Eclipse and run your code.

Regards,

– Gato