Project

General

Profile

error of schema version, when I tend to use external database

larry li
Added 5 months ago

I tend to use a external database for login and logout following the file http://docs.tigase.org/tigase-server/snapshot/Administration_Guide/html/#customAuthentication
and I met this error:

  =============================================================================
  ERROR! Component server (TigaseAuth) schema version is not loaded in the database or it is old!
  Required version: 8.0.0-SNAPSHOT-b5189
  Please upgrade the installation by running:
    $ ./scripts/tigase.sh upgrade-schema etc/tigase.conf
  =============================================================================

and I check the code and find "dataRepository.checkSchemaVersion(this, true);"

Need I initial the external database like it’s own? I worry that maybe influence other data.

and I config file as below

dataSource () {
    default () {
        uri = 'jdbc:postgresql://localhost/tigasedb?user=tigasedb&password=tigasedb&useSSL=false'
    }
    'default-auth' () {
        uri = 'jdbc:postgresql://localhost/pyspark?user=pyspark&password=pyspark&useSSL=false'
    }
}
authRepository {
    default () {
        cls = 'tigase.db.jdbc.TigaseAuth'
        'data-source' = 'default-auth'
    }
}
http () {
    'api-keys' {
        tigasedb {}
    }
    setup () {
        'admin-password' = 'tigasedb'
        'admin-user' = 'tigasedb'
    }
}
'virtual-hosts' {
    'desktop-tdmvsk8' {}
}

and I have provided two functions of TigUserLoginPlainPw and TigUserLogout.

How to prepare external database to work correctly? thanks!


Replies (3)

Added by Wojciech Kapcia TigaseTeam 5 months ago

First of all, tigase.db.jdbc.TigaseAuth is deprecated since version 8.0.0 and you should use tigase.db.jdbc.TigaseCustomAuth ( %Daniel, could you update the documentation ? )

Please take a look at database/postgresql-common-0.0.x.sql files - you should provide those StoredProcedures and tables (with correct data).

Added by larry li 5 months ago

Wojciech Kapcia wrote:

First of all, tigase.db.jdbc.TigaseAuth is deprecated since version 8.0.0 and you should use tigase.db.jdbc.TigaseCustomAuth ( %Daniel, could you update the documentation ? )

Please take a look at database/postgresql-common-0.0.x.sql files - you should provide those StoredProcedures and tables (with correct data).

thank a lot, I'll try.

Added by Wojciech Kapcia TigaseTeam 5 months ago

In the latest nightly we've added option to skip schema version management for particular DataSource - please check #7581.

    (1-3/3)