User authentication from separate database


I’'m trying to setup wildfire (3.1.0) in cooperation with an existing database. What I would like to accomplish is to fetch users and passwords from that db. I encode passwords with md5 hash and keep them in the db. I tried to use instructions given in file documentation/docs/db-integration-guide.html from wildfire source distribution - specifically the point called “Authentication integration”. However this does not work. Is it known to not work or maybe I should post more details?

Thanks for any help,



the JDBC auth provider should still work (I didn’'t test it anyhow) while the JDBC user provider does not work (JM-848).

Could you please post your configuration (without sensitive information) and error messages if you see some in the log files?



I added some configuration to wildfire.xml, and that is:

and while trying to log in I’'m getting this:

2006.10.19 07:39:07 org.jivesoftware.wildfire.auth.JDBCAuthProvider.getPasswordValue(JDBCAuthProvide Exception in JDBCAuthProvider

java.sql.SQLException: The url cannot be null

at java.sql.DriverManager.getConnection(

at java.sql.DriverManager.getConnection(

If this way of using md5 hashes does not work and will no longer be available, than what is a recomended way to do this?

However I must admit that I like this solution, and it looks extremaly clean to me

Bye, thanks for help

some good info

and/or do a forum search on jdbcAuthProvider - and read carefully, sounds like some of the configuration doc may need some updating.



the post above should help you to solve the “url cannot be null” issue.

If this way of using md5 hashes does not work and will no longer be available, than what is a recomended way to do this?” md5 hashes do still work as the auth provider is fine. Just the user provider has a problem.


Hello again

I had some hard time posting to this forum lately, so my reply is quite late.

I’'ve tried the suggested solution and it still does not work. However it outcomes in a new error message, which is:

2006.11.02 09:59:40 org.jivesoftware.wildfire.auth.JDBCAuthProvider.getPasswordValue(JDBCAuthProvide Exception in JDBCAuthProvider

org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet

My config looks almost exactly the same way as I posted previously, but I’'ve added these lines:

but this gives nothing new. Is the tag wrong? How to specify that username?

By the way, it would be nice to have a xml file with all the configuration possibilities, because javadoc isn’'t of much help (at least in this particular situation).

Do you have any ideas how to solve this problem?




for me


looks fine, so you need to add the username with “?user=” and the password with “&password=”.



You were right as for the connectionString. I had to add this.

But new errors follow:

2006.11.02 20:57:42 org.jivesoftware.wildfire.auth.JDBCAuthProvider.getPasswordValue(JDBCAuthProvide Exception in JDBCAuthProvider

org.postgresql.util.PSQLException: Index out of bound: 1, number of columns: 0.

The only thing added is the ?user=–&password=– part, nothing more. This seems to be an error on line 205 in However it seems unreasonable, because I’'ve passed password parameter.

Any ideas?


The forum could kill me. I expect that you need to use “&amp;” and not “&” as a seperator for the password as you must escape “&” in XML.

I did that, the forum also changed my post. I have an XML entity for & there, so it should work this way.


ah, the connection to the database seems to be fine, but

Or add a user with name “?” - this is possible and for this users your query will return the password (;


Thanks for Your help, all that solved my problem. Now even md5 passwords work.

Seems that it was mainly caused by not specified (and then wrongly specified) connectionString.