Adding user to roster issue


Issue with adding a contact to a roster. It throws this exception. Using Spark - I monitor the transaction going out, but the server does not seem to respond back to it. Any idea what’'s wrong ?

Server logs shows this

2006.10.04 19:38:18 [org.jivesoftware.wildfire.handler.IQRosterHandler.handleIQ(IQRosterHandler.jav a:119)

] Internal server error

org.jivesoftware.wildfire.user.UserAlreadyExistsException: rakesh@vlcserver

at org.jivesoftware.wildfire.roster.RosterItemProvider.createItem(RosterItemProvid

at org.jivesoftware.wildfire.roster.Roster.provideRosterItem(

at org.jivesoftware.wildfire.roster.Roster.provideRosterItem(

at org.jivesoftware.wildfire.roster.Roster.createRosterItem(

at org.jivesoftware.wildfire.handler.IQRosterHandler.manageRoster(IQRosterHandler. java:213)

at org.jivesoftware.wildfire.handler.IQRosterHandler.handleIQ( :104)

at org.jivesoftware.wildfire.handler.IQHandler.process(

at org.jivesoftware.wildfire.IQRouter.handle(

at org.jivesoftware.wildfire.IQRouter.route(

at org.jivesoftware.wildfire.spi.PacketRouterImpl.route(


at ava:51)



at 62)


at Source)


Hi guys,

I solved this. I added users to JiveDB manually buit forgot to update the JiveID with the new value for the rosterID field. There exists a JiveID table that stores the current id of the roster ID. This corresponds to the JiveID of 18. When this value is less than the current max rosterID

UserAlreadyExistsException is fired when a user tries to add a new roster entry. Hence users who have this problem should remember that once you manually add new roster elements, you need to update this field. I wonder why we’'re not using auto number or something. Most databases support them. Anyway, a more robust plan would be to fire a RosterIDException -> this is more meaningful. Another fantastic plan would be to do a check and see if the user does not exist in the specified roster and then update the JiveID table with the max(RosterID) from the jiveRoster table.

I think Jive is really cool.