powered by Jive Software

Eclipse and Jive Messenger

Has anyone had success setting up Eclipse to debug Jive Messenger? I’‘ve been able to get it to build using the ant build.xml, but I can’'t quite figure out how to get the server to run in a debugger.

I currently use the following settings in the debug configuration:

Main/main class[/i]: org.jivesoftware.messenger.starter.ServerStarter

Arguments/VM arguments[/i]: -DmessengerHome=

Classpath/User Entries[/i]: all jars in build/lib and its subfolders + various folders (target/resources/database, target/resources/i18n, target/resources/database/upgrade, target/resources/database/upgrade/2.0_to_2.1, target/resources/database/upgrade/2.1_to_2.2, src/resources/jar)



You can always attach a debugger.

Make sure that you have the java building in eclipse, than create a remote debug session and setting the host (localhost) and port (8000). The edit bin/messenger.bat so “goto run” says “goto debug” (forgive my .bat file skills, I’'m not sure how to set this on the command line). Start messenger and then start the remote debug session. You can set your break points where ever you want.


I can get jive messenger to run in Eclipse now, mostly. When I run or debug it, I get the following error:


at org.jivesoftware.admin.AdminConsole.getAppName(AdminConsole.java:94)

at org.jivesoftware.messenger.handler.IQVersionHandler.(XMPPServer.java:118)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at org.jivesoftware.messenger.starter.ServerStarter.start(ServerStarter.java:82)

at org.jivesoftware.messenger.starter.ServerStarter.main(ServerStarter.java:46)

I can’'t seem to make any sense of it. Any ideas?

Have you initialized Jive? The first time you run it, it requires you to configure a few things (like database, domain name, etc).

Also, make sure that your current working directory make since. It might be trying to read something that isn’'t there.


I was able to get Eclipse up and running Jive in a debug session. The main thing I did to fix the problem was to copy the java VM arguments from catalina.sh into the run configuration in Eclipse. One of the options caused the debugging not to work, so I omitted it. I believe it was -jarfile…