Project

General

Profile

how to build and run directly in eclipse

boscattle jiang
Added about 2 years ago

I download tigase-server and inport to eclipse by git. When I try to run it,but happened much error.for example:

Caused by: java.lang.RuntimeException: Could not initialize tigase.db.jdbc.DataRepositoryImpl for name 'default'
    at tigase.db.beans.MDPoolConfigBean.setInstances(MDPoolConfigBean.java:169)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at tigase.kernel.BeanUtils.setValue(BeanUtils.java:158)
    at tigase.kernel.core.Kernel.inject(Kernel.java:516)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:571)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.db.beans.MDPoolConfigBean.beanConfigurationChanged(MDPoolConfigBean.java:115)
    at tigase.db.beans.MDPoolConfigBean.initialize(MDPoolConfigBean.java:140)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:149)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
    at tigase.kernel.core.Kernel.getInstance(Kernel.java:357)
    at tigase.server.Bootstrap.start(Bootstrap.java:107)
    at tigase.server.XMPPServer.start(XMPPServer.java:130)
    at tigase.server.XMPPServer.main(XMPPServer.java:111)
Caused by: tigase.db.DBInitException: Database initialization failed
    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:312)
    at tigase.db.beans.MDPoolConfigBean.initRepository(MDPoolConfigBean.java:181)
    at tigase.db.beans.MDPoolConfigBean.setInstances(MDPoolConfigBean.java:167)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at tigase.kernel.BeanUtils.setValue(BeanUtils.java:158)
    at tigase.kernel.core.Kernel.inject(Kernel.java:516)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:571)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.db.beans.MDPoolConfigBean.beanConfigurationChanged(MDPoolConfigBean.java:115)
    at tigase.db.beans.MDPoolConfigBean.initialize(MDPoolConfigBean.java:140)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:149)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
    at tigase.kernel.core.Kernel.getInstance(Kernel.java:357)
    at tigase.server.Bootstrap.start(Bootstrap.java:107)
    at tigase.server.XMPPServer.start(XMPPServer.java:130)
    at tigase.server.XMPPServer.main(XMPPServer.java:111)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'tigasedb'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.Util.getInstance(Util.java:381)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
    at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:270)
    at tigase.db.jdbc.DataRepositoryImpl.initRepo(DataRepositoryImpl.java:452)
    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:306)
    at tigase.db.beans.MDPoolConfigBean.initRepository(MDPoolConfigBean.java:181)
    at tigase.db.beans.MDPoolConfigBean.setInstances(MDPoolConfigBean.java:167)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at tigase.kernel.BeanUtils.setValue(BeanUtils.java:158)
    at tigase.kernel.core.Kernel.inject(Kernel.java:516)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:571)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.db.beans.MDPoolConfigBean.beanConfigurationChanged(MDPoolConfigBean.java:115)
    at tigase.db.beans.MDPoolConfigBean.initialize(MDPoolConfigBean.java:140)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:149)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
    at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1259)
    at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:938)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
    at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
    at tigase.kernel.core.Kernel.getInstance(Kernel.java:357)
    at tigase.server.Bootstrap.start(Bootstrap.java:107)
    at tigase.server.XMPPServer.start(XMPPServer.java:130)
    at tigase.server.XMPPServer.main(XMPPServer.java:111)

I don`t know how to fix. but I think that my configuration file is error.

How should I run the debug project through the source code? Hope to get help!


Replies (1)

Added by Wojciech Kapcia TigaseTeam about 2 years ago

What exactly have you downloaded? It looks like you cloned git repository and use origin/master branch. I would recommend using origin/release branch which holds 7.1.0 (to be release as stable) and consult with the documentation: http://docs.tigase.org/tigase-server/7.0.3/Administration_Guide/html_chunk/

In eclipse you should pass path to configuration file, i.e.: --property-file etc/init.properties in startup options.

    (1-1/1)