Project

General

Profile

Help : Tigase server development with Eclipse.

kumar chavan
Added about 5 years ago

Hello,

Thanks in advance for the help.

I am Kumar, working as java developer(3.5yr Exp.). I am very new to Tigase and want to start Tigase development in Eclipse IDE.

I have tried many option got from Tigase site, bust finally resulted into nothing.

So, Can you please help me to to get out of this, as I am very much interested to work on Tigase.

Thank YOu.


Replies (16)

Added by Wojciech Kapcia TigaseTeam about 5 years ago

Hi,

basically you should clone tigase-server repository:

git clone https://repository.tigase.org/git/tigase-server.git

and then, in Eclipse use File -> Import -> Maven -> Existing maven project (or instead of clonning sources manually use option in Eclipse), select path where sources are and finally click Finish. Project should load and you can build it using "Run" command.

Added by kumar chavan about 5 years ago

Hello,

Thanks for the reply.

I am able to download and import the Tigase server in Eclipse.

But now I am getting bellow error in "pom.xml" -> tag

Plugin execution not covered by lifecycle configuration: org.codehaus.gmaven:gmaven-plugin:1.5:execute (execution: gitver, phase: validate) pom.xml /tigase-server line 13 Maven Project Build Lifecycle Mapping Problem.

I have gone through the URL : https://projects.tigase.org/boards/4/topics/646 but unable to get out of this error.

Can you please help me to get out of this.

Also, can you please help me little in details, for How to run the server as you mentioned above using "Run" command but I didn't get it.

Thank You.

Added by Wojciech Kapcia TigaseTeam about 5 years ago

kumar chavan wrote:

But now I am getting bellow error in "pom.xml" -> tag

Plugin execution not covered by lifecycle configuration: org.codehaus.gmaven:gmaven-plugin:1.5:execute (execution: gitver, phase: validate) pom.xml /tigase-server line 13 Maven Project Build Lifecycle Mapping Problem.

This is one of the oddities of m2e maven integration in Eclipse and can be safely ignored.

Can you please help me to get out of this.

Also, can you please help me little in details, for How to run the server as you mentioned above using "Run" command but I didn't get it.

Select the project, then select Run as from the Run menu and then Maven build. In the configuration dialog for the "base directory" select workspace directory (for example using browse workspace..."), in the goals enter "clean install". Click Apply and then Run.

Added by kumar chavan about 5 years ago

Hello,

I really appreciate your prompt response.

With your help I am able to run(maven build) the project. I have replace the configuration file from Tigase ".exe" installation(from other installation on same machine) in this workspace.

After this I tried to run server as a java application(SMPPServer.java) with argument "-Djdbc.drivers=com.mysql.jdbc.Driver --property-file etc/init.properties" and it seems to be running(not sure).

After I tried to connect server with PSI client but I am unable to connect it with user name admin@localhost.

So, can you please tell me, How to identify whether server is running or not? if yes how do I connect to server using client application like PSI(please suggest on client).

Also please let me know, am I on a right track or not?

Thanks a lot.

Added by Wojciech Kapcia TigaseTeam about 5 years ago

kumar chavan wrote:

After this I tried to run server as a java application(SMPPServer.java) with argument "-Djdbc.drivers=com.mysql.jdbc.Driver --property-file etc/init.properties" and it seems to be running(not sure).

After I tried to connect server with PSI client but I am unable to connect it with user name admin@localhost.

You should check your console (and logs in @logs/tigase.log.x@) for any errors. Also - you should prepare your database (v. Database preparation , if you used init.properties from other machine there is a high chance that the schema is missing). Finally - you should create an account you want to use - either on the database level (see stored procedure) or via in-band registration in your preferred client (in Psi, while creating new account you need to select option 'Register new account'). Also, please make sure your account match configured VHost.

Added by kumar chavan about 5 years ago

Hello,

Thanks for the help.

I have been able to start server successfully, thereafter have installed PSI client and able to register user. Now the I am facing problem while taking user on-line it gives error : "There was error communication with the server. Details : Authentication Error : Not Authorised". My user name is "kumar@sezitl029.infraseepz.lan".

Note : I have create self-signed certificate with the domain sezitl029.infraseepz.lan.

init.properties file entries

--cluster-mode = true

config-type = --gen-config-def

--debug = server

--user-db = mysql

--admins = admin@sezitl029.infraseepz.lan

--user-db-uri = jdbc:mysql://localhost/tigasedb?user=tigase&password=tigase12

--virt-hosts = sezitl029.infraseepz.lan

--comp-name-3 = message-archive

--comp-class-3 = tigase.archive.MessageArchiveComponent

--comp-class-2 = tigase.socks5.Socks5ProxyComponent

--comp-name-2 = proxy

--comp-class-1 = tigase.muc.MUCComponent

--comp-name-1 = muc

--sm-plugins = +message-archive-xep-0136

--ssl-container-class=tigase.extras.io.PEMSSLContextContainer

Attached is the log and tigase-config.xml file for the server.

Can you please suggest me what I am missing.

Thanks,

Kumar Chavan

Added by Wojciech Kapcia TigaseTeam about 5 years ago

Are you starting the server from Eclipse? Have you specify all parameters (especially @init.properties@?). It looks like Tigase is not picking up your configuration and use the default one.

Added by kumar chavan about 5 years ago

Hi,

Yes, I am using Eclipse to run the server as later I can debug the code as per my requirement. I am running "XMPPSever.java" as a Java application with argument "-Djdbc.drivers=com.mysql.jdbc.Driver --property-file C:/Users/user.name/tigase-server/etc/init.properties" and "-Djdbc.drivers=com.mysql.jdbc.Driver --property-file /etc/init.properties".

and I am facing problem while taking user on-line it gives error : "There was error communication with the server. Details : Authentication Error : Not Authorised"

"init.properties" and "tigase-config.xml" is same which is attached in last post.

Thanks.

Added by Wojciech Kapcia TigaseTeam about 5 years ago

In the "Java application" configuration in the arguments tab you should put in "Program arguments" path to your @init.properties@:

--property-file etc/init.properties

And in VM arguments any JVM configuratin, i.e. database:

-Djdbc.drivers=com.mysql.jdbc.Driver

Your attached log indicated that your init.properties configuration was not picked up, hence defaults were used:

2014-02-26 00:27:53.555 [main]             ConfiguratorAbstract.addUserRepo()  INFO:    [DEFAULT] Initialized tigase.db.DummyRepository as user repository pool:, 10 url: jdbc:derby:tigase-derbydb;create=true
2014-02-26 00:27:53.556 [main]             ConfiguratorAbstract.addAuthRepo()  INFO:    [DEFAULT] Initialized tigase.db.DummyRepository as user auth repository pool: 10, url: jdbc:derby:tigase-derbydb;create=true

Added by kumar chavan about 5 years ago

Hello,

Thanks.

As per your suggestion and after adding couple jar file into project class path, I am able to see that server is now loading the right "init.property" file but at the same I got got below error,

java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

at java.security.cert.PKIXParameters.setTrustAnchors(Unknown Source)

at java.security.cert.PKIXParameters.<init>(Unknown Source)

at java.security.cert.PKIXBuilderParameters.<init>(Unknown Source)

at tigase.extras.io.PEMSSLContextContainer.init(PEMSSLContextContainer.java:424)

at tigase.extras.io.PEMSSLContextContainer.init(PEMSSLContextContainer.java:372)

at tigase.io.TLSUtil.configureSSLContext(TLSUtil.java:89)

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

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

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

at tigase.conf.Configurator.componentAdded(Configurator.java:50)

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

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

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

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

at tigase.server.XMPPServer.start(XMPPServer.java:145)

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

I have created self signed certificate using Java "Keytool" command and copied under /cert folder, also I have put below entry in init.property file

"--ssl-container-class=tigase.extras.io.PEMSSLContextContainer"

one more thing, in Tigase.conf there is entry "TIGASE_CONFIG="etc/tigase.xml" which is not present in my workspace.

Attached is the log and "test\data\tigase-config.xml".

can you please help me.

Thanks.

Added by Wojciech Kapcia TigaseTeam about 5 years ago

With this init.properties configuration you are using older SSL implementation. Please either remove the line --ssl-container-class=… or use --ssl-container-class=tigase.io.SSLContextContainer (which is the default one as well), see Creating and loading the server certificate in pem files

Added by kumar chavan about 5 years ago

Dear Friend,

Thank you very much, for the help. I am able start Tigase server successfully and able to connect/test with PSI client.

As mentioned earlier I am running Tigase server from Eclipse so that I will go into architectural and working details of Tigase or XMPP server.

So, here my very first step is to understand the TIgase/XMPP server's architecture and working, which will help me to customise the TIgase server.

Can you please suggest me the material or way to get start, like debugging server using Eclipse but without architectural knowledge it is very hard to debug.

Please suggest.

Thanks,

Kumar.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

Here is a presentation about Tigase Architecture

Please let me know if that helps.

Added by kumar chavan about 5 years ago

Hello,

I have gone through the Tigase architecture document suggested by you which is very high level, but I need something which will have the detail on each small component which Tigase or IM have.

Being a software developer in various framework and Java I am good in programming but very new to the XMPP and IM technology, and which I have stated with Tigase, so please suggest accordingly any book/URL which could be out of Tigase also.

Thanks.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

The best book to start is the: XMPP: The Definitive Guide then you have the XMPP spec and extensions. Unfortunately we do not have detailed documentation for Tigase yet, except our online Devel guide and Admin guide

Added by kumar chavan about 5 years ago

Hello Artur,

Thanks for the help.

The book suggested by you is very good and easy to understand for XMPP beginner.

Thanks,

    (1-16/16)