Project

General

Profile

Bug #4876

Avatar?id=6023&size=50x50 Avatar?id=6023&size=22x22

Lots of exceptions and errors while starting the server

Added by Artur Hefczyc TigaseTeam about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
2017-02-01
Due date:
2017-03-31
% Done:

100%

Estimated time:
Database:
n/a
Applicable version:
git/master
Source Code Disclaimer:

Description

I am following the installation guide: http://docs.tigase.org/tigase-server/snapshot/User_Guide/html/#webinstall

When started the server using command:

scripts/tigase.sh start

I am getting lots of NPE and other exceptions in attached log file which look like this:

 Caused by: java.lang.NoSuchMethodException: tigase.db.UserRepository.<init>()
         at java.lang.Class.getConstructor0(Class.java:3082)
         at java.lang.Class.newInstance(Class.java:412)
         at tigase.kernel.core.Kernel.createNewInstance(Kernel.java:178)
         at tigase.kernel.core.Kernel.initBean(Kernel.java:105)
         at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:551)
         at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:725)
         at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1286)
         at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:963)
         at tigase.db.beans.MDPoolConfigBean.beanConfigurationChanged(MDPoolConfigBean.java:115)
         at tigase.db.beans.AuthUserRepositoryConfigBean.beanConfigurationChanged(AuthUserRepositoryConfigBean.java:84)
         at tigase.db.beans.MDPoolConfigBean.initialize(MDPoolConfigBean.java:140)
         at tigase.db.beans.AuthUserRepositoryConfigBean.initialize(AuthUserRepositoryConfigBean.java:106)
         at tigase.kernel.core.Kernel.initBean(Kernel.java:148)
         at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:551)
         at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:725)
         at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1286)
         at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:963)
         at tigase.kernel.core.Kernel.initBean(Kernel.java:139)
         at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:551)
         at tigase.kernel.core.Kernel.initBean(Kernel.java:143)
         at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:551)
         at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:725)
         at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1286)
         at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:963)
         at tigase.kernel.core.Kernel.initBean(Kernel.java:139)
         at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:551)
         at tigase.kernel.core.Kernel.initBean(Kernel.java:143)
         at tigase.kernel.core.Kernel.getInstance(Kernel.java:371)
         at tigase.server.Bootstrap.start(Bootstrap.java:108)
         at tigase.server.XMPPServer.start(XMPPServer.java:136)
         at tigase.server.XMPPServer.main(XMPPServer.java:117)

It looks to me like there is some kind of binary generation problem which causes to combine incompatible source code into distribution package.

tigase-console.log (65.1 KB) tigase-console.log Artur Hefczyc, 2017-02-01 01:14 AM
tigase.log.0 (570 KB) tigase.log.0 Artur Hefczyc, 2017-02-01 01:14 AM

Related issues

Related to Tigase XMPP Server - Task #4877: default dataSource should use either dummy or XMLRepositoryClosed2017-02-012017-04-14

Related to Tigase HTTP API - Feature #4880: config-type=setup implementationClosed2017-03-282017-04-28

Related to Tigase HTTP API - Task #4896: setup module is not compatible with 7.2.0Closed2017-03-282017-04-07

Related to Tigase XMPP Server - Bug #4897: AMP Message repository in XMLRepositoryClosed2017-02-142017-02-17

Associated revisions

Revision c7d8e675 (diff)
Added by W Administrator about 2 years ago

#4876: add whitelisting of tigase.* classes so tigase.db.xml.XMLRepository won’t be filtered out by “.xml.” rule.

Revision f17b3760 (diff)
Added by W Administrator about 2 years ago

#4876: update default config, bump xmltools/utils dependency, update XMLRepository and DummyRepository

Revision b02367dc (diff)
Added by W Administrator about 2 years ago

#4876: let’s use XML repository as default….

Revision df460ce4 (diff)
Added by W Administrator about 2 years ago

#4876: add missing field annotation

Revision ad0ebb0f (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

#4876: let’s use XML repository as default….

Revision 1cf25239 (diff)
Added by W Administrator about 2 years ago

#4876: updated default config to use message plugin instead of messageAmp; additional debug

Revision 9e0edcc4 (diff)
Added by W Administrator about 2 years ago

#4876: not needed anymore

History

#1 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

  • Description updated (diff)

#2 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

  • Status changed from New to In Progress

Artur Hefczyc wrote:

I am following the installation guide: http://docs.tigase.org/tigase-server/snapshot/User_Guide/html/#webinstall

When started the server using command:

[...]

I am getting lots of NPE and other exceptions in attached log file which look like this:

[...]

It looks to me like there is some kind of binary generation problem which causes to combine incompatible source code into distribution package.

%kobit

Not exactly. I've verified and all dependencies use correct versions, in addition we are always doing a clean build from the HEAD to avoid possible problems with caching and some such.

As web installer works more-or-less without proper configuration it generates a lot of exceptions and errors (there probably should be an additional config-type=setup which would skip initialization of majority of components/database) and it was happening in 7.1.0 as well:

2017-02-01 12:38:17.080 [main]             ConfiguratorAbstract.setProperties()  SEVERE: Can't initialize user default repository:
tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:derby:tigase-derbydb;create=true
        at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:627)
        at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:672)
        at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:888)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:817)
        at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:519)
        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:152)
        at tigase.conf.Configurator.componentAdded(Configurator.java:50)
        at tigase.conf.Configurator.componentAdded(Configurator.java:33)
        at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
        at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:138)
        at tigase.server.MessageRouter.setConfig(MessageRouter.java:644)
        at tigase.server.XMPPServer.start(XMPPServer.java:142)
        at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: java.sql.SQLSyntaxErrorException: 'TIGGETDBPROPERTY' is not recognized as a function or procedure.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
        at tigase.db.jdbc.JDBCRepository.checkDBSchema(JDBCRepository.java:1060)
…

Now:

  • default, empty config in 7.2.0 haven't been updated to DSL format:
wojtek@atlantiscity.local ~/dev/tmps/tigase-server-dists/tigase-server-7.2.0-SNAPSHOT-b4638 $ cat etc/init.properties
config-type=--gen-config-def
--admins=admin@$HOST_NAME
--virt-hosts = $HOST_NAME
--debug=server

--comp-name-1=http
--comp-class-1=tigase.http.HttpMessageReceiver

http/setup/admin-credentials=admin:tigase
  • with the upgraded config there are still exceptions regarding repository which is to be expected (vide above comment);

  • ignoring the exception and taking tigase to semi-working state we run into:

2017-02-01 14:02:44.677 [main]             AbstractBeanConfigurator.configure()  WARNING: Can't prepare value of property 'admin-credentials' of bean 'setup': 'admin:tigase'
tigase.kernel.KernelException: Unknown bean 'setup#KERNEL'.

I'm continuing working in the issue.

#3 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

  • Related to Task #4877: default dataSource should use either dummy or XMLRepository added

#4 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

I've made a couple of fixes but it's still far from working:

  • updated the default config;

  • fixed classloader in utils (it was ignoring tigase.db.xml.XMLRepository because it checks for blacklisted packages and it have ".xml." as ignored package - I've whitelisted all "tigase." classes)

  • make initial adjustments of tigase.db.xml.XMLRepository for new dataRepository

I'll continue tomorrow.

#5 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam about 2 years ago

A few comments.

  1. My conclusion about binary/version problem was based on the: java.lang.NoSuchMethodException which is usually related to incompatible APIs usage. Other exceptions: NPE and repository initialization related are expected and I understand them.

  2. config-type=setup sounds like a good idea

  3. I am not sure if using XMLRepository is a good idea. It has not been updated and used for quite some time. I even thought it has been removed from our code already. It seems to me that using DummyRepository instead is a better idea. But if you have already made XMLRepository working, than that's OK.

#6 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

  • Related to Feature #4880: config-type=setup implementation added

#7 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

Artur Hefczyc wrote:

A few comments.

My conclusion about binary/version problem was based on the: java.lang.NoSuchMethodException which is usually related to incompatible APIs usage. Other exceptions: NPE and repository initialization related are expected and I understand them.

This was a result of lack of configuration update and the defaults handling logic not being updated as well.

config-type=setup sounds like a good idea

Added #4880

I am not sure if using XMLRepository is a good idea. It has not been updated and used for quite some time. I even thought it has been removed from our code already. It seems to me that using DummyRepository instead is a better idea. But if you have already made XMLRepository working, than that's OK.

I've updated XMLRepository about a year ago for the purpose of using in in the unit tests and it's quite handy for that purpose and used in many tests. What is lacking it's adjusting it to the new DataSource introduced in 7.2.0.

Andrzej was very opposed to using DummyRepository (which isn't adjusted to 7.2.0 as well)

#8 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Wojciech Kapcia to Artur Hefczyc
  • % Done changed from 0 to 100

I've managed to get the server to the runnable state with the default configuration; there is still work remaining to adjust components to Kernel but those will be carried out in separate tasks. Setup module will be fixed in #4896.

#9 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

  • Related to Task #4896: setup module is not compatible with 7.2.0 added

#10 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

  • Related to Bug #4897: AMP Message repository in XMLRepository added

#11 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam about 2 years ago

  • Due date changed from 2017-02-02 to 2017-02-28
  • Status changed from Resolved to In QA

I will look at it ASAP. Actually, when the web installer is working.

#12 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam about 2 years ago

  • Due date changed from 2017-02-28 to 2017-03-17
  • Priority changed from Critical to Normal

#13 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam about 2 years ago

  • Due date changed from 2017-03-17 to 2017-03-31

#14 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam about 2 years ago

  • Status changed from In QA to Closed

Also available in: Atom PDF