本文介绍了openfire.xml中指定的属性"provider.user.className"与数据库中存储的属性不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在配置openfire.xml以进行自定义数据库集成,以下是我的openfire.xml

I am configuring openfire.xml for custom database integration and following is my openfire.xml

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

<!--
    This file stores bootstrap properties needed by Openfire.
    Property names must be in the format: "prop.name.is.blah=value"
    That will be stored as:
        <prop>
            <name>
                <is>
                    <blah>value</blah>
                </is>
            </name>
        </prop>

    Most properties are stored in the Openfire database. A
    property viewer and editor is included in the admin console.
-->
<!-- root element, all properties must be under this element -->
<jive> 
  <adminConsole> 
    <!-- Disable either port by setting the value to -1 -->  
    <port>9090</port>  
    <securePort>9091</securePort> 
  </adminConsole>  
  <locale>en</locale>  
  <!-- Network settings. By default, Openfire will bind to all network interfaces.
      Alternatively, you can specify a specific network interfaces that the server
      will listen on. For example, 127.0.0.1. This setting is generally only useful
       on multi-homed servers. -->  
  <!--
    <network>
        <interface></interface>
    </network>
    -->  
  <connectionProvider> 
    <className>org.jivesoftware.database.DefaultConnectionProvider</className> 
  </connectionProvider>  
  <database> 
    <defaultProvider> 
      <driver>com.mysql.jdbc.Driver</driver>  
      <serverURL>jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true</serverURL>  
      <username>root</username>  
      <password>123</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>  
  <jdbcProvider> 
    <driver>com.mysql.jdbc.Driver</driver>  
    <connectionString>jdbc:mysql://localhost/openfire?user=root&amp;password=123</connectionString> 
  </jdbcProvider>  
  <provider> 
    <auth> 
      <className>org.jivesoftware.openfire.auth.JDBCAuthProvider</className> 
    </auth>  
    <user> 
      <className>org.jivesoftware.openfire.user.JDBCUserProvider</className> 
    </user> 
  </provider>  
  <jdbcAuthProvider> 
    <passwordSQL>SELECT password FROM user WHERE username=?</passwordSQL>  
    <passwordType>sha256</passwordType> 
  </jdbcAuthProvider>  
  <jdbcUserProvider> 
    <loadUserSQL>SELECT name,email_address FROM user WHERE username=?</loadUserSQL>  
    <userCountSQL>SELECT COUNT(*) FROM user</userCountSQL>  
    <allUsersSQL>SELECT username FROM user</allUsersSQL>  
    <searchSQL>SELECT username FROM user WHERE</searchSQL>  
    <usernameField>username</usernameField>  
    <nameField>name</nameField>  
    <emailField>email</emailField> 
  </jdbcUserProvider> 
</jive>

errors.log 中没有错误,但是我在 warn.log 文件

there are no errors in errors.log but I see this line in warn.log file

2014.04.09 09:24:18 org.jivesoftware.util.JiveGlobals - Property 'provider.user.className' as specified in openfire.xml differs from what is stored in the database.  Please make property changes in the database instead of openfire.xml.

我正在通过查看但仍是警告.任何人都可以告诉我我在做什么错吗?

I am modifying the openfire.xml by looking this but still a warning.Can any body please tell me what mistake I am doing?

推荐答案

在对数据库进行身份验证时会出现一些错误.

Well there is Some Mistake While authenticating Database.

查看此框

在属性名称约定不同的地方,其'provider.auth.className'而不是'provider.user.className'尝试一下,我相信这会有所帮助,其他方式是,即使您可以登录到openfire,也可以仅添加系统属性,也可以添加您的手动属性. :)尝试我确定会有所帮助

where the properties name convention is differ its 'provider.auth.className' and not 'provider.user.className'try that and i am sure that will help and other way is even u can login to your openfire and just system properties u can add your manual properties. :) try that i am sure that will help

这篇关于openfire.xml中指定的属性"provider.user.className"与数据库中存储的属性不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 12:27