Openfire Custom Database Configuration



I'm trying to use my database in openfire server to use for android chat application that work on xmpp.. But I'm really confused as it's the first time for me to work with openfire server.. I followed this to do that but it doesn't work.. I can't login with users in my database and when I create a new user from the admin console it doesn't appear in my database..


Here's openfire.xml



<?xml version="1.0" encoding="UTF-8"?>

<jive>
<adminConsole>
<port>9090</port>
<securePort>9091</securePort>
</adminConsole>
<locale>en</locale>
<jdbcProvider>
<driver>com.mysql.jdbc.Driver</driver>
<connectionString>jdbc:mysql://localhost:3306/test</connectionString>
</jdbcProvider>
<provider>
<auth>
<className>org.jivesoftware.openfire.auth.JDBCAuthProvider</className>
</auth>
<user>
<className>org.jivesoftware.openfire.user.JDBCUserProvider</className>
</user>
<group>
<className>org.jivesoftware.openfire.group.JDBCGroupProvider</className>
</group>
</provider>
<jdbcAuthProvider>
<passwordSQL>SELECT password FROM users WHERE username=?</passwordSQL>
<passwordType>plain</passwordType>
</jdbcAuthProvider>
<jdbcUserProvider>
<loadUserSQL>SELECT username,status FROM users WHERE username=? </loadUserSQL>
<userCountSQL>SELECT COUNT(*) FROM users</userCountSQL>
<allUsersSQL>SELECT username FROM users</allUsersSQL>
<searchSQL>SELECT username FROM users WHERE</searchSQL>
<usernameField>username</usernameField>
<nameField>status</nameField>
<emailField>username</emailField>
</jdbcUserProvider>
<connectionProvider>
<className>org.jivesoftware.database.DefaultConnectionProvider</className>
</connectionProvider>
<database>
<defaultProvider>
<driver>com.mysql.jdbc.Driver</driver>
<serverURL>jdbc:mysql://localhost:3306/test? rewriteBatchedStatements=true</serverURL>
<username encrypted="true">0f0bbca3a4ffc907b45a7a3feee84f73efa054b83529edb3</username>
<password encrypted="true">935209210060d2ca57188c7b7fac91a26bf316868c4eea59</password>
<testSQL>select 1</testSQL>
<testBeforeUse>false</testBeforeUse>
<testAfterUse>false</testAfterUse>
<minConnections>5</minConnections>
<maxConnections>25</maxConnections>
<connectionTimeout>1.0</connectionTimeout>
</defaultProvider>
</database>
<setup>true</setup>
</jive>


Do I need to change any thing else.. ? :S


No comments:

Post a Comment