powered by Jive Software

vCard issue after upgrade + other issues

It seems that after I upgraded to 2.2.0 (nightly released, RC and finally official release) I’'ve been getting the vCard pop up from PSI every time I close out PSI and re-open it. Before it would only pop up if you had not entered the vCard information, now it seems as it erases the contents or the server does not save them?

Furthermore my contact list does not seem to update as well as it did before, I find myself needing to log off/on to refresh it. The weird thing is that it does update me when people log in/out but not all the time.

I am running Jive 2.0.0 with the same DB since 1.5? Linux, with about 100 users.

Thanks in advance for any possible help.

aha, so i’‘m confirming the first issue! I have noticed Psi acting the same in Group Chats at JiveSoftware.com. Psi is the same version for a long time. Gato suggested to post this on Psi forum, but now i’'m in doubts.

Hey wroot,

I tried to reproduce this issue using Psi with a l local server and at js.com and in both cases it worked fine. That is, once the user has published his vCard then the window never appeared again after login.

I checked your account at js.com and there is no vCard information for your account. Are you pressing the Public button after you filled out the vCard form?

Regards,

– Gato

Hola Carlos,

After doing the update from 2.1.5 to 2.2.0 (or from beta2 to 2.2.0) all vCard information stored in the database was lost. So until users enter their new vCard information again Psi will keep prompting that window. Could you also check for any related error in the error.log file? Maybe there was an issue while doing the database upgrade from 2.1.5 to 2.2.0.

Regards,

– Gato

I checked your account at js.com and there is no

vCard information for your account. Are you pressing

the Public button after you filled out the vCard

form?

yes, i’‘m Publishing it every time, and successfully. Ok, next time i’'ll try to fill all these nasty fields in it, not just the Name or Nickname

BTW, how are you checking my vCard? In Admin Console? Or via client?

Hola Gato,

This is what’'s happening …

I close PSI, re-open it, vCard window comes up. I enter some information, not all, publish it, close it. Log off the server, log back in, no vCard pop up. Go home for the day and leave my psi window open. Log in to the same jive server w/ my same user name with a diff priority and resource and I get the vCard pop up with all the fields blanked out. Filled them again. Come back to work, log off, log on, boom vCard blanked out pops up again.

You mentioned a DB upgrade from 1.5 to 2.0 I did not run any sort of DB upgrade script. Is there one included that I missed to run or use?

Just checked the error.log file via admin and I do see vCard errors all over the place…

at org.jivesoftware.messenger.handler.IQvCardHandler.handleIQ(IQvCardHandler.java: 106)

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

at org.jivesoftware.messenger.IQRouter.handle(IQRouter.java:213)

at org.jivesoftware.messenger.IQRouter.route(IQRouter.java:73)

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

at org.jivesoftware.messenger.net.SocketReader.processIQ(SocketReader.java:258)

at org.jivesoftware.messenger.net.ClientSocketReader.processIQ(ClientSocketReader. java:43)

at org.jivesoftware.messenger.net.SocketReader.readStream(SocketReader.java:230)

at org.jivesoftware.messenger.net.SocketReader.run(SocketReader.java:111)

at java.lang.Thread.run(Thread.java:595)

2005.08.12 07:36:42 org.jivesoftware.messenger.vcard.DefaultVCardProvider.loadVCard(DefaultVCardProv ider.java:63)

java.sql.SQLException: Column not found message from server: “Unknown column ‘‘value’’ in ‘‘field list’’”

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)

at com.mysql.jdbc.Connection.execSQL(Connection.java:2247)

at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1586)

at org.jivesoftware.messenger.vcard.DefaultVCardProvider.loadVCard(DefaultVCardPro vider.java:56)

at org.jivesoftware.messenger.vcard.VCardManager.getOrLoadVCard(VCardManager.java: 180)

at org.jivesoftware.messenger.vcard.VCardManager.getVCard(VCardManager.java:173)

at org.jivesoftware.messenger.handler.IQvCardHandler.handleIQ(IQvCardHandler.java: 106)

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

at org.jivesoftware.messenger.IQRouter.handle(IQRouter.java:213)

at org.jivesoftware.messenger.IQRouter.route(IQRouter.java:73)

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

at org.jivesoftware.messenger.net.SocketReader.processIQ(SocketReader.java:258)

at org.jivesoftware.messenger.net.ClientSocketReader.processIQ(ClientSocketReader. java:43)

at org.jivesoftware.messenger.net.SocketReader.readStream(SocketReader.java:230)

at org.jivesoftware.messenger.net.SocketReader.run(SocketReader.java:111)

at java.lang.Thread.run(Thread.java:595)

2005.08.12 07:38:50 org.jivesoftware.messenger.vcard.DefaultVCardProvider.loadVCard(DefaultVCardProv ider.java:63)

java.sql.SQLException: Column not found message from server: “Unknown column ‘‘value’’ in ‘‘field list’’”

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)

at com.mysql.jdbc.Connection.execSQL(Connection.java:2247)

at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1586)

at org.jivesoftware.messenger.vcard.DefaultVCardProvider.loadVCard(DefaultVCardPro vider.java:56)

at org.jivesoftware.messenger.vcard.VCardManager.getOrLoadVCard(VCardManager.java: 180)

at org.jivesoftware.messenger.vcard.VCardManager.getVCard(VCardManager.java:173)

at org.jivesoftware.messenger.handler.IQvCardHandler.handleIQ(IQvCardHandler.java: 106)

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

at org.jivesoftware.messenger.IQRouter.handle(IQRouter.java:213)

at org.jivesoftware.messenger.IQRouter.route(IQRouter.java:73)

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

at org.jivesoftware.messenger.net.SocketReader.processIQ(SocketReader.java:258)

at org.jivesoftware.messenger.net.ClientSocketReader.processIQ(ClientSocketReader. java:43)

at org.jivesoftware.messenger.net.SocketReader.readStream(SocketReader.java:230)

at org.jivesoftware.messenger.net.SocketReader.run(SocketReader.java:111)

at java.lang.Thread.run(Thread.java:595)[/b]

Message was edited by:

zgambitx

Normal DB upgrade is possible only when doing 2.1.5 > 2.2.0 RC or Final. Otherwise, you should tweak your DB manually.

try reading this:

http://www.jivesoftware.org/forums/thread.jspa?threadID=15131&tstart=0

But i’‘m getting such issue with jivesoftware.com server, i think it was upgraded normally. Now i’‘have tested it with my own clean 2.2.0 installation, and i’'m not getting a vCard popup.

wroot,

Thanks for the reply, I read the thread however I am not proficient with editing of DB’‘s manually and I could not tell much from the posts. I will try doing a search of Gato’‘s posts as he mentioned he’'s talked about the DB upgrade before.

Thanks for your help.

Carlos,

The server will try to update the database automatically. However, this time we had beta1, beta2 and RC versions so the update script would fail between beta2 and RC. My bet is that all you need to execute are these lines from the script:

  1. jiveVCard: Recreate table from scratch

DROP TABLE jiveVCard;

CREATE TABLE jiveVCard (

username VARCHAR(32) NOT NULL,

value TEXT NOT NULL,

PRIMARY KEY (username)

);

Regards,

– Gato

Gato,

Thanks for the help, I know you’‘re pretty much are solving the issue for me but I need additional guidance. How do I run that piece of the code? Do you want me to change something on a script? Like I said I’‘m pretty bad at this stuff, I can install the heck of anything, I just can’'t write or code or follow coding procedures very well. LOL

Carlos,

The easiest way (IMHO) is to use a query tool so you can execute those commands from a nice and user-friendly GUI. Try installing this tool http://dev.mysql.com/downloads/query-browser/1.1.html or check if you already have a similar tool installed in your PC.

You will need to start that tool, go to the messenger database, open an SQL window or Query Area (each tool has a different name for the same thing), paste the code that I posted and then execute it. In the above link you can also read the documentation if you need any help installing/using that tool.

Regards,

– Gato

PhpMyAdmin says:

Your SQL-query has been executed successfully

SQL-query:

  1. jiveVCard: Recreate table from scratch

DROP TABLE jiveVCard;# MySQL returned an empty result set (i.e. zero rows).

CREATE TABLE jiveVCard(

username VARCHAR( 32 ) NOT NULL ,

value TEXT NOT NULL ,

PRIMARY KEY ( username )

);# MySQL returned an empty result set (i.e. zero rows).

Thank you. I shall keep you updated on the results.

You are correcto! Thank you sir!

Hi,

i have the same Problem: Productive Jive Jive Messenger 2.1.4 with approx 100 users --> upgrade to stable 2.2.2

Problem: VCard Info gets lost during the upgrade process (this is very annoying for my “customers”)

I checked the Database Upgrade Scripts and found the “Recreate table from scratch” section

Isnt there a script that can use the old VCard data?

Hey Nano,

The previous vCard implementation was losing user’‘s data and mixing it too and the solution was to reimplement it again. Unfortunately, the database structure are not compatible. Since the users’’ data was corrupted we didn’'t try to recover it and instead preferred to enter it again. If you still want to “migrate” the old data I think that the easiest way would be to capture the XML sent by each user when updating its vCard. Once you got those packets you can upgrade the database and the XMPP server and then rerun those packets. You may want to take a look our Smack library for this job.

Regards,

– Gato

thx gato,

the idea to modify one of my smack bots so that it iterates through all possible clients on the old server, reads their vcard data and then sends this data to the new 2.2.2 is indeed interesting.

I will check the API if this is possible with resonable effort.

thx!

btw: beeing a java engineer myself - the jive code is exactly what it should be… easy understandable, clear api, good job!

ok, it is possible - but the current vcard implementation in smack isnt powerful enough to do the job without manual interaction/patching the vcard implementation.

if somebody else wants to try it:

one of the problems was: psi has updated the “Full Name” VCard Field… not the given ame/Surname fields… --> patched VCard so that it takes “Full name” as given name if no given name was set.

psi has set the "Tel/Number field… this field is unknown for VCard (only Tel/Business, Tel/Private is known)

after having done this vcard patch my migration path was:

  1. transfer the database to the new 2.2 installation, run the server, let the server do his automatic db conversion --> vcards are lost, rest of the db is migrated

  2. reset the passwords of every JID to a well known initial pw via an sql update statement (only in the new db, otherwise my conversion bot can not log in)

  3. use the patched vcard impl to write a small bot that connects to the old server, reads the vcard, connects to the new server and publishes the vcard (100 lines or so)

  4. hard shutdown of the new database (hsql, textfile-mode with journal)

  5. delete all the update password statements in the db-journal that were the result of step 2

  6. start the new db-server and use jive on it

  7. and 5. are an ugly quick hack… but it was the fastes solution to reactivate the old user passwords

Message was edited by:

Nano