Project

General

Profile

Problem installing to use embedded derby database

Rich Anderson
Added almost 6 years ago

I have installed the latest version (tigase-server-5.1.5-b3164) using the console installer. Although I would love to use a MySQL database, I cannot because my MySQL server connection is via a Unix socket, which is not usable by jdbc.

So I installed using the embedded derby database, and everything with the install looked good.

However, when I started the server, the following problem occurred:

2013-07-22 17:42:50 ConfiguratorAbstract.setProperties() SEVERE: Can't initialize user default repository:

tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:derby:/usr/share/web/kdcsrla2/tigase/tigasedb

    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java)

    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java)

    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java)

    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java)

    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java)

    at tigase.server.MessageRouter.setConfig(MessageRouter.java)

    at tigase.server.XMPPServer.main(XMPPServer.java)

Caused by: java.sql.SQLException: No suitable driver found for jdbc:derby:/usr/share/web/kdcsrla2/tigase/tigasedb

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

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

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

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

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

    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java)

    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java)

    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java)

    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java)

    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java)

    at tigase.server.MessageRouter.setConfig(MessageRouter.java)

    at tigase.server.XMPPServer.main(XMPPServer.java)

2013-07-22 17:42:50 ConfiguratorAbstract.setProperties() SEVERE: Can't initialize auth default repository:

tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:derby:/usr/share/web/kdcsrla2/tigase/tigasedb

    at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java)

    at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java)

    at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java)

    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java)

    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java)

    at tigase.server.MessageRouter.setConfig(MessageRouter.java)

    at tigase.server.XMPPServer.main(XMPPServer.java)

Caused by: java.sql.SQLException: No suitable driver found for jdbc:derby:/usr/share/web/kdcsrla2/tigase/tigasedb

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

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

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

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

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

    at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java)

    at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java)

    at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java)

    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java)

    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java)

    at tigase.server.MessageRouter.setConfig(MessageRouter.java)

    at tigase.server.XMPPServer.main(XMPPServer.java)

2013-07-22 17:42:51 UserRepositoryMDImpl.addUser() WARNING: Couldn't obtain user repository for domain: vhost-manager, not even default one!

2013-07-22 17:42:51 UserRepositoryMDImpl.getData() WARNING: Couldn't obtain user repository for domain: vhost-manager, not even default one!

Can someone help me figure out why it can't find the jdbc driver for derby, when that is supposedly build into the distribution???

Thanks for any assistance...


Replies (7)

Added by Wojciech Kapcia TigaseTeam almost 6 years ago

can you post file list of the contents of jars/ and libs/ directories?

Added by Rich Anderson almost 6 years ago

ls jars

tigase-server.jar

ls libs

groovy-all-1.8.5.jar jdbc-postgresql.jar tigase-utils.jar

jdbc-mysql.jar jtds-1.2.2.jar tigase-xmltools.jar

Added by Wojciech Kapcia TigaseTeam almost 6 years ago

Haven't you by any chance deselected package that contains DB drivers? It's selected by default and with default installtion option those drivers will be present in libs/ directory.

Added by Rich Anderson almost 6 years ago

I just did the console install again, with the same result. The jars/ and libs/ directories contain the same files as noted previously.

I am going to attempt the "manual install in console mode" to see if that makes a difference. I probably won't get a chance to try that for a couple of days, so stay tuned!

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam almost 6 years ago

Indeed, derby libraries are missing for some reason. Please download them manually from our source code repository: https://projects.tigase.org/projects/tigase-server/repository/revisions/master/show/jars Download all the Derby jars and put them into the libs directory. Let us know if that helps.

Added by Wojciech Kapcia TigaseTeam almost 6 years ago

As Artur suggested - you can grab missing jars from our repository, put them (for the tigase-5.1.5) in libs/ directory - this should help.

As for the installer - I've just used console installer and it installed libraries just fine:

wojtek@atlantiscity ~/dev/tmps $ java -jar tigase-server-5.1.5-b3164.jar -console

Welcome to the installation of Tigase XMPP (Jabber) Server 5.1.5-b3164!

The homepage is at: http://www.tigase.org/

...

Select the packs you want to install:

1 => Base, The base files

2 => Unix Files, Files needed to run the server on Unix like systems

3 => [x] Docs, The documentation

4 => [x] Extras, Extras libraries, MUC, PubSub...

5 => [x] Groovy scripting, Various Groovy scripts extending server functionality

6 => [x] Derby Database (DB included), Derby database (included) and JDBC driver

7 => [x] MySQL Database driver (DB not included), MySQL JDBC driver (MySQL has to be installed separately)

8 => [x] PostgreSQL Database driver (DB not included), PostgreSQL JDBC driver (PostgreSQL has to be installed separately)

9 => [x] SQL Server Database driver (DB not included), SQL Server JDBC driver (SQL Server has to be installed separately)

10 => [ ] Sources, The server source files, tools and libraries sources are not included

r => Redisplay menu

d => Done

Choose action: d

press 1 to continue, 2 to quit, 3 to redisplay

1

[ Starting to unpack ]

[ Processing package: Base (1/9) ]

[ Processing package: Unix Files (2/9) ]

[ Processing package: Docs (3/9) ]

[ Processing package: Extras (4/9) ]

[ Processing package: Groovy scripting (5/9) ]

[ Processing package: Derby Database (DB included) (6/9) ]

[ Processing package: MySQL Database driver (DB not included) (7/9) ]

[ Processing package: PostgreSQL Database driver (DB not included) (8/9) ]

[ Processing package: SQL Server Database driver (DB not included) (9/9) ]

[ Unpacking finished ]

Install was successeful

application installed on /Users/wojtek/dev/tmps/tigase-server-5.1.5

[ Console installation done ]

wojtek@atlantiscity ~/dev/tmps $ ls -lah tigase-server-5.1.5/li

License.html libs/

wojtek@atlantiscity ~/dev/tmps $ ls -lah tigase-server-5.1.5/libs/

total 48264

drwxr-xr-x 14 wojtek staff 476B 26 lip 09:45 ./

drwxr-xr-x 15 wojtek staff 510B 26 lip 09:45 ../

rw-r--r- 1 wojtek staff 6,2M 18 kwi 13:06 derby.jar

rw-r--r- 1 wojtek staff 377K 18 kwi 13:06 derbytools.jar

rw-r--r- 1 wojtek staff 12M 18 kwi 13:06 groovy-all-1.8.5.jar

rw-r--r- 1 wojtek staff 1,1M 18 kwi 13:06 jdbc-mysql.jar

rw-r--r- 1 wojtek staff 930K 18 kwi 13:06 jdbc-postgresql.jar

rw-r--r- 1 wojtek staff 1,9M 13 lut 2011 jdmkrt.jar

rw-r--r- 1 wojtek staff 463K 12 lut 2011 jtds-1.2.2.jar

rw-r--r- 1 wojtek staff 103K 14 sty 2013 tigase-extras.jar

rw-r--r- 1 wojtek staff 222K 14 sty 2013 tigase-muc.jar

rw-r--r- 1 wojtek staff 317K 14 sty 2013 tigase-pubsub.jar

rw-r--r- 1 wojtek staff 359K 18 kwi 13:07 tigase-utils.jar

rw-r--r- 1 wojtek staff 72K 18 kwi 13:07 tigase-xmltools.jar

wojtek@atlantiscity ~/dev/tmps $ ls -lah tigase-server-5.1.5/jars

total 4120

drwxr-xr-x 3 wojtek staff 102B 26 lip 09:45 ./

drwxr-xr-x 15 wojtek staff 510B 26 lip 09:45 ../

rw-r--r- 1 wojtek staff 2,0M 24 kwi 11:37 tigase-server.jar

Could you share console output from your installation followed by directory listings?

Added by Rich Anderson almost 6 years ago

Well, before trying any of the above suggestions I was able to use Linux to ssh to my website and use the GUI installer. Guess what? It worked fine, and the server is fully-functional with the derby database.

I wonder, based on the example above, if I should have selected packs 3 through 9 instead of just 6 (for derby).

But in any event, my problem has been solved and I thank you for your help...

    (1-7/7)