powered by Jive Software

Problems with custom database integration

Hi,

I’m using wildfire version 3.1.0 and I’m having a problem with the custom database integration. Following the guide I’ve managed to activate the jdbc authentication however I’m having an issue. The user gets connected and authenticated but I’m not receiving any messages from outside. If I look at the open sessions tab I’m getting that a user 6aeaf583 is connected instad of (in this case lucb). This string changes, next time was 8ab3aae1 (like names of java objects in the heap). Anyone knows if this issue is solved in more recent versions of wildfire/openfire?

Srgjan

I’ve installed the latest version of openfire and the user still gets assigned a weird username (making it impossible for the user to receive messages). I’m using more or less the same configuration from here http://www.igniterealtime.org/community/thread/22009 except I’ve done the modifications to reflect the wildfire to openfire changes and removed the group provider. My database is postgres 8.1.

It would seem this is the same issue I’ve posted 8 months ago. Could it be it was neglected?

Some more details, if I use a wrong password wildfire negates login (which means authentication works). If I use a user that was registered in the mean period before using the custom jdbc provider the user actually gets logged in AND has a correct username so he can receive messages. Could this be a heplfull hint?

Srgjan

Anyone, please?

Srgjan

Hi Srgjan,

That funny looking username normally relates to a user logged in anonymously. I’m guessing that the JID resource also have the same funny string, so the full JID is like for e.g. 8ab3aae1@servername/8ab3aae1. It seems to me like after the successful authentication the server could not associate the username with an existing user data, therefore it allows login but with an anonymous status and the username changed. If your openfire.xml is like shown in your other thread, I think I might have spotted some errors:

jdbc:postgresql://localhost:5432/csai?user=theuser&password=thepassword

Also the provider section must appear once only. On the contrary, you have more than a provider section scattered around in the file. You should include all your providers in a single provider section, as follows, and remove all others:

<provider>
  <auth>     <className>org.jivesoftware.wildfire.auth.JDBCAuthProvider<;/className>   </auth>   <user>     <className>org.jivesoftware.wildfire.user.JDBCUserProvider<;/className>   </user>   <group>     <className>org.jivesoftware.wildfire.group.JDBCGroupProvider<;/className>   </group> </provider>

Because you use multiple provider section and you define your AuthProvider first in the file, the authentication works but your UserProvider and GroupProvider don’t.

BTW, you’re looking at the guide for Wildfire. The latest custom database integration guide for Openfire is here

Hope that helps.

Hi,

Thanks for the reply, I’ll check out the openfire documentation and try again,

I’ll note that I am escaping the ampersand but I am declaring the provider section twice so that might be it.

As soon as I try it I’ll post a follow back and give points. Thanks.

Srgjan

Putting just one “provider” section did the trick. Thank you very much!

I think the tag should have been called “providers” instead to reflect that multiple providers are expected, no?

Thanks again,

Srgjan