Project

General

Profile

Mysql connection error

Prashanth Raghu
Added about 4 years ago

Hi,

I am trying to connect my tigase instance to the Mysql DB server but am getting the following error:

: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/tigasedb?user=user&password=pwd

at java.sql.DriverManager.getConnection(DriverManager.java:689)

at java.sql.DriverManager.getConnection(DriverManager.java:270)

at tigase.db.jdbc.DataRepositoryImpl.initRepo(DataRepositoryImpl.java:483)

at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:335)

at tigase.db.RepositoryFactory.getDataRepository(RepositoryFactory.java:393)

at tigase.muc.history.HistoryManagerFactory.getHistoryManager(HistoryManagerFactory.java:54)

... 20 more

I have also added the driver class in the JAVA_OPTIONS property in the tigase.sh run script.

What am I missing here ?

Regards,

Prashanth


Replies (14)

Added by Wojciech Kapcia TigaseTeam about 4 years ago

How do you start Tigase? It should be started with:

scripts/tigase.sh start etc/tigase.conf

The etc/tigase.conf file contains all needed environment variables, including all driver classes.

Please revert all your changes (including addition of --JAVA_OPTIONS to init.properties and try above description)

Added by Prashanth Raghu about 4 years ago

Hi Wojciech,

Thanks for the reply.

I have tried to do as said, but I continue to face the same error.

Regards,

Prashanth

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Please provide a list of all libraries (i.e. @ $ls -lah jars/@ from tigase-server main directory) as well as output from the logs/tigase-console.log from the start (please remove all logfiles before startup of the server!)

Added by Prashanth Raghu about 4 years ago

Hi Wojciech,

I have added the requested files as attachments.

I have also eliminated the previous logs.

Regards,

Prashanth

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Again:

  • please provide the full list of available libraries!

  • list all the steps you use to start the server

  • do you intend to run tigase in OSGi mode?

Added by Prashanth Raghu about 4 years ago

Hi Wojciech,

Sorry for the wrong image file.

  1. File attached with the available libraries ( jars.out )

  2. steps to start the server

scripts/tigase.sh start etc/tigase.conf

  1. I do not intend to run the server in Osgi mode

Regards,

Prashanth

jars.out (3.33 KB) jars.out

Added by Wojciech Kapcia TigaseTeam about 4 years ago

  1. steps to start the server

scripts/tigase.sh start etc/tigase.conf

  1. I do not intend to run the server in Osgi mode

Could you share your etc/tigase.conf file?

Added by Prashanth Raghu about 4 years ago

Sure. It's the default provided by tigase.

tigase.conf (695 Bytes) tigase.conf

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Actually you've enabled OSGi. Can you revert your configuration to default:

OSGI=${osgiEnabled}

Can you also share output of

scripts/tigase.sh check etc/tigase.conf

Added by Prashanth Raghu about 4 years ago

Hi Wojciech,

To be honest I did not know what OSGI was.

I am now executing with OSGI=true which appears to be the default value.

I have attached the output of the command.

Regards,

Prashanth

out (3.39 KB) out

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Prashanth Raghu wrote:

I am now executing with OSGI=true which appears to be the default value.

No, it's not the default value. I provide you default value in previous step. Please follow the instructions!

Added by Prashanth Raghu about 4 years ago

Hi Wojciech,

I have followed your instructions. But the error still persists.

I have also made some more observations which might be useful:

  1. The error occurs only when I select OSGI mode as enabled during installation( I am using the installation jar ). In this case tigase.conf has OSGI=true to be set without any changes from my end.

  2. When I set OSGI=false, the server is able to detect the MySQL instance.

Regards,

Prashanth

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Thank you for reporting with OSGi/MySQL - we will look into it.

Given that OSGi mode is still new and requires some more polishing it may has some rough edges. If not needed it's recommended not to enable OSGi mode (i.e. OSGI=${osgiEnabled} or @OSGI=false@).

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Btw. I've tired latest nightly (http://build.tigase.org/nightlies/dists/2014-11-14/) and tigase in OSGi mode with MySQL works without any problem.

    (1-14/14)