powered by Jive Software

JDBC and encoding problems with openfire 3.3.3 and MySQL


Gato was very helpful in the live chat yesterday to find the encoding problems I have with the JDBC and MySQL.

Offline messages and user names, vcards… get corrupted and turn to ??? signs when are non-latin characters. When I manually edit the database and change one`s vcard to non-lattin characters it works fine and I can see them using a client.

Gato said I should change my JDBC url from: jdbc:mysql://localhost:3306/openfire to jdbc:mysql://localhost:3306/openfire?useUnicode=true&characterEncoding=UTF-8

When I tried that and restarted openfire I didnt get errors but the admin console wont show up and I can`t login with clients. Only the “chracterEncoding=UTF-8” part causes the problem.

Gato than advised me to upgrade the MySQL JBDC. Ive downloaded the 5.1.5 and replaced it with the mysql.jar(version 3.1.13) file in the lib folder. I still cant load the admin console when I use the new jbdc url. When I use the old one I can login and see on the “Database” tab that the jdbc version is still 3.1.13.

  • Is it possible that the new jdbc will be included in the next release of openfire?

  • Is it possible that utf8 will be the openfire default?

  • Am I suppose to see the new version of the jdbc in the admin console or am I doing something wrong?



After alot of testing I got a little further. I`ve upgraded the mysql

jdbc to version 5.1.5.

JAVA excepts ; as a delimiter in the jdbc

url but you have to escape it and write ‘& amp ;’ instead of just ;.

Now I can create users with non-latin usernames (latin passwords so I won`t

complicated things) with the admin console and spark but I still can`t


Latin usernames works fine.

I`m using this jdbc url in


<serverURL>jdbc:mysql://localhost:3306/openfire?useUnicode=true&charac terEncoding=UTF-8</serverURL>

I`ve also


<serverURL>jdbc:mysql://localhost:3306/openfire?useUnicode=true&charac terEncoding=UTF-8&ResultSets=UTF-8</serverURL>

but I still can`t login. Can anyone help me with that?