Hack Tigase Jabber/XMPP Server in Eclipse
If you want to write a code for Tigase server you might want to use Eclipse. Here is a guide how to start working on source code using this IDE.
All you need to start is:
- Installed and working copy of Eclipse
- Installed and working copy of JDK-1.6.0Beta2 at least.
- Installed and working Subclipse pluggin for Eclipse.
Click on image to see it in full size.
JDK-1.6.0 setup.
After installation JDK-1.6.0 in your operating system, run Eclipse and select Window/Preferences.
In section Java/Installed JREs press Add button. In the new opened window enter path to installed JDK-6. In my case it is /opt/jdk1.6.0. It also good to set name to sun-jdk-1.6.0.
Subclipse installation
As Eclipse doesn't contain built-in support for Subversion repositories you have to add new pluggin.
Detailed instruction for Subclipse installation is on page: subclipse.tigris.org/install.html.
Project import
From menu File in Eclipse execute Import. Next, highlight section Team/Team Project Set and press Next.
Enter file name tigase-server.psf in field File and press Finish.
The file is attached to this article.
Because kobit has objections to add Eclipse configuration files to subversion repository you have to do it on your own.
That's it. Start hacking now!
- Add new comment
- 9693 reads









>On my site the projects did
>On my site the projects did not compile correctly, but that did not prevent from being able to use debugger as described below.
I have called manual build on utils, then on xmltools, then on server project and all compilation errors have gone. So, just to note, that with netbeans one can just open projects in IDE and build them without need to setup any dependencies manually.
For the developing from IDE
For the developing from IDE process - I was able to attach remote debugger to tigase server running on remote inet host from netbeans - everything is rather standard:
0. Load tigase source code to netbeans (it supports maven projects out-of-the-box rather well, so it should recognize server, utils and xmltools projects as they were taken from svn). On my site the projects did not compile correctly, but that did not prevent from being able to use debugger as described below.
1. On the server side change tigase.conf:
DEBUG_OPTS=" -Xdebug -Xrunjdwp:transport=dt_socket,address=9000,server=y,suspend=n "JAVA_OPTIONS="${GC} ${ENC} ${DRV} -server -Xms100M -Xmx200M -XX:PermSize=32m -XX:MaxPermSize=256m -XX:MaxDirectMemorySize=128m ${DEBUG_OPTS} "
and restart server
2. In netbeans (for eclipse everything must be generally the same I suppose) open menu Debug/Attach Debugger and in the opened dialog values:
Debugger: Java debugger (JPDA)
Connector: socket attach
Transport: dt_socket
Host: yourhost.com
Port: 9000
Timeout: - I have empty
Press ok and wait for a while (probably even minute or 2) - the debugger should attach and Debugging view should show list of running threads. Hit breakpoint in SessionManager.createUserSession() and try to login from some client to server - the breakpoint should stop there and IDE should show variable values in real time.
Shawn, thank you for
Shawn, thank you for providing this information. I am sure many users will find it useful. I am going to try using Eclipse as well so this will be helpful for me too.
I have been doing some Tigase
I have been doing some Tigase development within Eclipse and have the server able to be run and debugged from within it. The setup I am using is to have the main src code from Tigase in one project and then setup a second project that I call tigase-local. This project just contains the configuration files and maven dependency to the main Tigase project.
Once that is setup then I was able to figure out what flags were needed by looking at the scripts/tigase.sh file along with the etc/tigase.conf file. In your run configuration you should have the following settings:
Main Class: tigase.server.XMPPServer
Program arguments: --property-file etc/init.properties
VM arguments:
-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8
-Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver:org.apache.derby.jdbc.EmbeddedDriver
-server -Xms100M -Xmx200M -XX:PermSize=32m -XX:MaxPermSize=256m -XX:MaxDirectMemorySize=128m
You will want to change the jdbc.drivers to contain the drivers you need to connect to your database backend.
That should be it and you then can run / debug the Tigase server itself.
I am sorry, I don't use
I am sorry, I don't use eclipse and I don't run Tigase from any IDE and I don't recommend running it from any IDE.
I am sorry I can't help you too much with your question.
I have downloaded the souce
I have downloaded the souce code from svn server,but I don't know how I can start the server use eclipse.
I just want to know how I can
I just want to know how I can start the server use IDE like eclipse? Thanks.
Have a look at this document,
Have a look at this document, section: Start the server.
How can I start the Server?
How can I start the Server?
See PSF file in
See PSF file in attachment.
But note, that our projects in our SVN repository doesn't have .classpath and .project files. It means that you should add project dependencies yourself.
tigase-server depends on tigase-utils and tigase-xmltools
tigase-utils depends on tigase-xmltools
Where can I find the psf
Where can I find the psf file?