powered by Jive Software

Cannot add contacts to private contacts group

Greetings from Spain to everyone!

My problem is the following: I have several hundreds of users inside their groups. They see each other correctly and can chat without any problem. The problem appeared when we decided to add the functionality to add personal contacts belonging to groups users DON’'T HAVE TO BE NECESSARILY ATTACHED TO. In order to do this we created a personal contacts group (CONTACTOS PERSONALES). If those contacts to be added belong to the same group of the user there is no problem and everything works fine. However, if they belong to different groups we find an error.

This is the xml we are sending from our client to the server:

Finally, here we are the server internal log error:

at java.lang.Thread.run(Unknown Source)

at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:119)

at org.jivesoftware.wildfire.net.SocketReader.readStream(SocketReader.java:264)

at org.jivesoftware.wildfire.net.ClientSocketReader.processIQ(ClientSocketReader.j ava:50)

at org.jivesoftware.wildfire.net.SocketReader.processIQ(SocketReader.java:396)

at org.jivesoftware.wildfire.PacketRouter.route(PacketRouter.java:65)

at org.jivesoftware.wildfire.IQRouter.route(IQRouter.java:96)

at org.jivesoftware.wildfire.IQRouter.handle(IQRouter.java:265)

at org.jivesoftware.wildfire.handler.IQHandler.process(IQHandler.java:48)

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

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

at org.jivesoftware.wildfire.roster.Roster.createRosterItem(Roster.java:280)

at org.jivesoftware.wildfire.roster.Roster.provideRosterItem(Roster.java:292)

at org.jivesoftware.wildfire.roster.Roster.provideRosterItem(Roster.java:322)

at org.jivesoftware.wildfire.roster.RosterItemProvider.createItem(RosterItemProvid er.java:113)

org.jivesoftware.wildfire.user.UserAlreadyExistsException: t147392@fernando-magnus

] Error interno en el servidor

2006.05.24 17:49:22 [org.jivesoftware.wildfire.handler.IQRosterHandler.handleIQ(IQRosterHandler.jav a:119)

I hope everything was enough clear. Thank you!


how did you do this: “In order to do this we created a personal contacts group (CONTACTOS PERSONALES).” ?


Hello! Thanks for the answer and sorry for the delay. It was late at night in here when you answered back. I leave work at 9 am California time.

That´s just another group inside jivegroups table. The new jiveroster+jiverostergroups entry should relate both users inside “contactos personales” group just like Wildfire correctly does whenever an user adds a user belonging to his or her same group. However, we get an error.

Imagine we have John and Paul inside Beatles group and Mick and Keith inside Stones group. John and Paul can see and chat each other and so can Mick and Keith. John can add Paul to his personal contacts groups by sending the same xml instruction I posted yesterday to the Wildifre server. However, this isn’‘t too interesting since John can already see Paul. The problem appears when John wants to add Mick to his personal contacts list. We don’‘t understand why we get the exception (UserAlreadyExistsException: t147392@fernando-magnus), just like if the server was trying to create a new t147392 user (let´s say Mick). We tried to control this by creating a before insert trigger in jiveuser table but it didn’'t work.

Any idea?

One more thing. We were using our own client program and this morning we have been trying it with Spark client, getting the same problem. We have found out that the server DOESN’'T send us any error xml to our ‘‘create new roster’’ request. That error xml from the server we posted yesterday is an answer to a presence type request the client sends.


“The problem appears when John wants to add Mick to his personal contacts list.” - Using Spark one can create a local group in his own roster (Contacs, Add Contact Group), I’'ll call it “privy”. Then one may add a user (Contacs, Add Contact) to it, for example "Mick@company.com" “Mick” “privy”. So Mick will get a subscription request and if he accepts John has a group “privy” with “Mick”.

Probably you don’'t like the idea that Mick must accept the subscription, there are some ideas about an auto-accept-subscription plugin.

A client can not modify a server-side group.


Hi all,

I have the same problem. When I try to add one new user to my roster with Spark it does nothing. Before upgrading database and Wildfire everything worked fine. I’‘ve noticed that Spark sends its xml message and then Wildfire server creates an error log like fegoros said. The other user doesn’'t receive any xml message.

But this doesn’‘t happen always. I think the problem is when a new row is needed to be inserted in jiveroster table. I use TKabber client as well Spark. I’'m working with an external Oracle db. If I insert the row into db manually then it works fine, but i need to restart the server for cache update.

Yes, I agree with saulroc. it2000, you just explained me how to use Spark interface. I am using my own chat client and sending xml commands similar to Spark xml commands to the server. The only difference is that I’‘ve added one visibility atribute (subscription=’‘both’’) to allow both users see each other. Check my first post for details.

It seems that things work fine when there is already an entry in jiveroster table relating two users and we only need to have a new entry in jiverostergroups relating those two users in a new group by increasing rankID. The error appears when a new relationship between users doesn’‘t exist yet and a new entry needs to be created in jiveroster. This happens both with my client and with Spark client. It’'s just like if the server had some problem with the creation of a new valid rosterID, I don´t know. I just know I need help!

No answer on this topic yet?

I found the problem, I no update jiveID when I insert rows in jiveroster table. I update this table and then all works fine.

I finally got a right answer. I feel absolutely disappointed about Jivesoftware gurus, administrators or whatever people who should be in charge or answering questions in forums like to be called.

I want you to know that you have showed an absolute incompentence in this question. Didn’'t you know that JiveID table is used as a table of sequences or what? When I was sending the xml command to add the new contact, the server was looking for the next rosterID to be inserted in Jiveroster by looking up the JiveID number in IDtype 18 row. I believe this was a simple enough question to be answered pretty fast and you have kept ignoring it. I would like that you really took care of the users who are making use of your tool.


Hi Fernando,

I apologize for the difficulty you had in getting your original question answered. The growth of the community around Jive Wildfire, Spark and Smack has been incredible over the last couple of years and it’s great to see how responsive (LG replied to your first post in less than an hour ) and helpful everyone is to one another on these forums. One unfortunate side-effect of all this growth is that, on occasion and despite everyone’s best attempts, a question or two is going to be missed or go unanswered.

If you (or anyone else for that matter) should post another question that you feel isn’'t getting the attention it deserves please feel free to “bump” the thread, send a Private Message to one of the developers or better yet, come to the url=http://www.jivesoftware.org/group-chat.jspweekly chat[/url] to discuss the issue you’re having.

Hope to see you on forums again soon,


Hi Fernando,

sometimes it is really hard to understand what one wants to do and what one did to get the error. I’'m often disappointed about the quality of the questions and the (not) described steps which one took to get the error. If you did modify the database using SQL and not Wildfire you may have posted it somewhere. So you may have gotten the right answer very fast as it is for some users no problem to run an SQL trace.



There are many people who are integrating Wildfire chat inside their own application by using Wildfire server + another client different from Spark, as I am sure you are aware of. This means many of us haven’‘t started from scratch and, as far as I know, SQL is needed to dump the many users and groups from our existing tables into Wildfire tables. Also, as far as I know there isn’‘t too much information to do this. We had to look into the forum postings to know what was the purpose of each table and the way we had to dump and handle our data. People are really missing some sort of manual that makes easy (or possible, actually) to deal with Wildfire tables and Wildfire server so that it’'s possible to integrate clients and Wildfire server in an effective way.

Anyway, due to the lack of response we kept looking into Wildfire source code until we ended up figuring out the error and fixing it by ourselves. The biggest frustration was when another user (different from saulroc) who was getting the exact same error wrote me a private email a few days ago asking for help. He had seen how little help Jivesoftware gurus had provided to us and thought that I would probably be of much better help. He also complained about lack of information, the need of a manual, etc. This was the main reason why I posted that angry last entry.

As we’‘ve checked, the kind of problem we got seems to be quite a common one, so I’‘ll write a few more lines in case they’‘re helpful for someone. There are triggers in our tables which were supposed to update Wildfire tables so that Wildfire users and groups structure was kept up to date, but we clearly missed the jiveID table detail. When one user added a contact to his or her personal contacts group, the correct xml command was sent to the server, but the server looked for the wrong sequential number in the non-updated JiveID table. Provided UserAlreadyExistsException was really confusing because it wasn’‘t a problem related to jiveuser table or any user at all, but to jiveroster’'s id rosterid table.

It’‘s my turn now to apologise for the tone of my response. After all, you’'re doing a great job and I understand that Wildifre is something that may be getting too big to be able to 100% cope with it.



there is already a JDBC Auth provider available and in some weeks also a JDBC Group provider (JM-660) will be available which allows to query other databases for usernames, passwords and groups. This should make it much more easy to use a userbase which is stored in another database.

I assume you had some good reasons not to use it and it could be interesting to know what the reasons were so one can consider improving the JDBC providers.


Good morning,

I had no idea such a thing existed. The question is, in which part of the extensive Wildfire documentation should we have found it? If such a thing (documentation) exists, I and many other Wildfire users would be very grateful if you told us where to find it.

I guess you agree with me that a support forum isn’‘t and shouldn’‘t be a manual. We’‘ve been looking into it whenever we found trouble and it has been very helpful so far (until I posted my topic, actually). Dumping our database into Wildfire tables didn’‘t cause any trouble, so we never happened to consider JDBC providers. I guess this shouldn’‘t have happened if we had been able to download some .doc or .pdf file for developers in which there was a nice index with Wildfire main features and functionalities instead of having to swim among thousands and thousands of forum postings. We’‘ve noticed that people keep asking things which, on my opinion, are so basic that shouldn’‘t have brought up any posting. Things as simple as the meaning and correspondece of idtype column in Jiveid table, for instance. Table columns aren’'t even commented in any database upgrade!

I wish this helps. All of us really want Wildfire to keep growing and being improved.



Hi Fernando,

I agree with you that a support forum isn’‘t and shouldn’'t be a manual.

It was discussed that a Wiki would be nice to have as there really does not exist a public(?) manual. The KB articles are in my opinion also not a good solution to document things. I have no idea about the commercial license, maybe it comes with a documentation.

Hopefully Matt says something about a Wiki or an official manual, the problem is the same with Spark, there are some undocumented features one may find or miss browsing the forum.