Project

General

Profile

Tigase 8 Configuration and debugging n Eclipse

Abdul Aziz
Added 2 months ago

Previously I configured tigase 7 in eclipse and ran it successfully.

Noe we have moved to tigase 8.

I have cloned the git repo from master branch of official tigase site.

Project build successfully but it does not create jars folder like it did in tigase 7 which contains dependencies.

I have some questions.

if jars folder its present how do I prepare Database in Mysql.

When I run tigase server through XMPPServer class in eclipse.

it gives following error

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

I have attached my config.tdsl file.

I have created schema by downloading and installing tigase server from tar file.
tigase-server-8.0.0-RC1-b9961-dist-max.tar.gz

But my aim is to customize and run tigase server from eclipse

Thank you in advance

config.tdsl (595 Bytes) config.tdsl

Replies (5)

Added by Abdul Aziz 2 months ago

$ ./scripts/tigase.sh upgrade-schema etc/tigase.conf

I already updataed the schema using above command but it didnt resolve anything.

Added by Wojciech Kapcia TigaseTeam 2 months ago

Abdul Aziz wrote:

Project build successfully but it does not create jars folder like it did in tigase 7 which contains dependencies.

This is because tigase-server repository contains now only sources of the server itself. Building of distribution packages in handled via project configuration defined in dedicated repository: https://tigase.tech/projects/tigase-server-distribution/repository. mvn -Pdist clean install will download all defined dependencies and place them in tigase-server-distribution/target/dist/jars/

I have some questions.

if jars folder its present how do I prepare Database in Mysql.

There is install-schema command (Install Database) that helps you prepare the database.

When I run tigase server through XMPPServer class in eclipse.

it gives following error

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

This is because Eclipse doesn't generate correct manifest file with build version (i.e. ignores maven configuration). You can disable checking of the schema version: Using modified database schema

Added by Abdul Aziz 2 months ago

Thank you very much.
Your answers helped alot.

As I mentioned earlier I am using database schema created from web installer and I am running server code from eclipse and as you suggested :

'schema-management' = false

did the trick. Now I am able to run the server but I want to create schema/prepare database using mysql.
I followed the url you provided.

There is install-schema command (Install Database) that helps you prepare the database.

But when I run the command in Ubantu terminal:

./scripts/tigase.sh install-schema etc/tigase.conf -T mysql -D tigasedb9 -H localhost -U tigase_user -P tigase -R root -A aziz12345 -J admin@administrator-OptiPlex-7040 -N tigase

I get following error:

TIGASE_HOME is not set or main binary (jars/tigase-server*.jar) was missing in /home/sw-07/Desktop/Tigase8/tigase-server/. location
Please set it to correct value before starting the sever.

Please rememebr that I am running server from Eclipse And As I mentioned in my first question there is no /jars folder in tigase 8 repository.

Please help step by step

I have tigase-server.jar available in target directory but I am missing /jars directory.

Added by Abdul Aziz 2 months ago

I have managed to change TIGASE_HOME and TIGASE_JAR paths in tigase.sh file

Now I am facing following issue while running install scehma command

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: tigase/util/ui/console/CommandlineParameter
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    at java.lang.Class.getMethod0(Class.java:3018)
    at java.lang.Class.getMethod(Class.java:1784)
    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: tigase.util.ui.console.CommandlineParameter
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

Thank you in advance.

Added by Wojciech Kapcia TigaseTeam 2 months ago

Abdul Aziz wrote:

Please rememebr that I am running server from Eclipse And As I mentioned in my first question there is no /jars folder in tigase 8 repository.

Please help step by step

I have tigase-server.jar available in target directory but I am missing /jars directory.

As I mentioned before - there won't be jars/ directory in tigase-server repository as this is only Tigase Server repository (and it doesn't prepare binary package!).

Abdul Aziz wrote:

I have managed to change TIGASE_HOME and TIGASE_JAR paths in tigase.sh file

Now I am facing following issue while running install scehma command

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: tigase/util/ui/console/CommandlineParameter
  at java.lang.Class.getDeclaredMethods0(Native Method)
  at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
  at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
  at java.lang.Class.getMethod0(Class.java:3018)
  at java.lang.Class.getMethod(Class.java:1784)
  at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
  at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: tigase.util.ui.console.CommandlineParameter
  at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

This means that you lack dependency - tigase-server depends on tigase-utils and tigase-xmltools - you should include them in your classpath (or list of dependencies in Eclipse).

    (1-5/5)