Openfire SVN + Eclipse 3.3 + Subversive Installation Guide

This guide assumes that you are installing everything from scratch. If you’ve done some parts of them, this guide may still be useful. I compiled this guide to the best of my knowledge. I apologize if it doesn’t work for you.

Notes:

  • This guide assumes that you want the latest updates of the source i.e. from the project’s trunk directory. If you only want the released/stable version, checkout the desired release from under the tags directory.


Install JDK

  • Download JDK and install them. The least version should be 1.5. I use 1.6. Sorry, no instruction for this.

Install Eclipse 3.3

  • Download Eclipse 3.3 from www.eclipse.org. I use Eclipse IDE for Java EE Developers. You should at least use Eclipse IDE for Java Developers.

  • Extract the downloaded zip file into C:/Program Files/Eclipse.

  • Open C:/Program Files/Eclipse folder.

  • Right click and drag eclipse.exe on to your desktop (or Windows taskbar) to create a shortcut icon.

  • Right click the shortcut icon and choose Properties. The Eclipse Properties window will show.

  • The Target textbox should read something like this “C:\Program Files\Eclipse\eclipse.exe” -vm “C:\Program Files\Java\jdk1.6.0\bin\javaw” depending on the JDK that you use and where you installed it.

  • Close the Eclipse Properties window.

Install Subversive Plugin

  • Double-click the shortcut icon to start Eclipse.

  • Select/enter your preferred workspace and click OK to open Eclipse main IDE window.

  • Click on the Workbench icon to close the welcome screen.

  • Click Help::Software Updates::Find and Install… menu.

  • Click on Search for new features to install and click Next.

  • Click on New Remote Site… button.

  • Enter Subversive in the Name box and http://www.polarion.org/projects/subversive/download/1.1/update-site in the URL box (Check the latest URL from http://www.eclipse.org/subversive website), then click OK.

  • Click Finish to install Subversive. Eclipse will search for the update site and show the result in a next window where you will select the features to install. I choose everything under Subversive SVN Team Provider Plugin and Subversive Client Libraries.

  • Click Next to continue and so on until the installation ends. You normally want to restart Eclipse when the installation ends.

Check Out Openfire SVN

  • Click Windows::Open Perspective::Other… menu.

  • Click on SVN Repository Exploring on the Open Perspective window and click OK.

  • Right-click on SVN Repositories screen and choose New::Repository Location…

  • On New Repository Location enter http://svn.igniterealtime.org/svn/repos in the URL box and click Finish. You’ll see the URL location in the SVN Repositories screen.

  • Expand the URL location.

  • Expand the openfire tree.

  • Right-click on trunk and choose Check Out. Make yourself some Cafe-Latte while waiting for the checkout to complete.

Create Openfire Project

  • Click Window::Open Perspective::Java menu.

  • In the Project Explorer screen, if there is an openfire project, delete it. This project was created during the Openfire check out process. Yes you read it correctly, DELETE the project!!! Otherwise you’ll have to setup your Openfire development environment manually. On the Confirm Project Delete choose Do not delete contents, then click Yes.

  • Click File::new::Project… Notice the ellipses!!!

  • Select Java::Java Project and click Next.

  • On the New Java Project window choose Create project from existing source and browse to where openfire folder is located under your workspace.

  • In the Project name box enter exactly as openfire. Otherwise, the Next and Finish button remain disabled. Click on Next. Eclipse will read the directory structure to setup the environment automatically (almost) for you and you can see what it does on the next screen. Then click on Finish.

  • If the Open Associated Perspective windows opens, click Yes.

Build Openfire

  • Click Window::Show View::Ant menu.

  • Right-click the Ant screen and choose Add Buildfiles…

  • Expand the openfire::build folder and select build.xml, then click OK.

  • On the Ant screen, expand the Openfire XMPP Server and double-click on openfire ant task. The build may fail because you’re checking out the daily updates of Openfire sources, which may contain bugs. If so, wait for another day and hope that the developers discover and fix the bug; or you might dare to fix it yourself. During this first time setup, a successful build is necessary before you can proceed with the remaining tasks below.

Create Project Builder

  • Click Run::Open Run Dialog… or Run::Open Debug Dialog… menu. A Run window shows.

  • Select Java Application and click on the New button.

  • On the Main tab of the Run window, change the New_configuration name to Openfire or anything you like.

  • Click on Project::Browse button and select openfire and click OK.

  • Click on Main class::Search button and select ServerStarter - org.jivesoftware.openfire.starter and click OK.

  • I’d suggest that you select Stop in main check box so that you could later verify that debugging works.

  • Click on the Arguments tab.

  • Enter -DopenfireHome="${workspace_loc:openfire}/target/openfire" in the VM arguments box.

  • Click on Classpath tab.

  • Select User Entries so that the Advanced… button will be enabled.

  • Click on the Advanced… button.

  • On the Advanced Options window select Add Folders and click OK.

  • On the Folder Selection window select openfire::src::i18n folder and click OK.

  • Click on the Advanced… and Add Folders buttons once again to include openfire::src::resources::jar folder.

  • Click on the Advanced… and Add Folders buttons once again to include openfire::build::lib::dist folder.

  • Click on Common tab.

  • Select the Debug and Run check box.

  • Click on Apply button.

  • Click on Close button.

Run/Debug

  • The setting is now complete for Openfire.

  • You may test running and debugging by clicking on Run::Run History::Openfire and Run::Debug History::Openfire respectively. If you choose the later and if you follow this instruction closely, execution will stop on the main method in ServerStarter.java.

Plugin Setup

Related Documents

3 Likes

Very cool! I couldn’t figure out how to use Eclipse with another project and this showed me what I was missing! Excellent guide.

I tried to add new Repository location http://svn.igniterealtime.org/svn/repos/, but I got the following error:

Error validating location: "org.tigris.subversion.javahl.ClientException: svn: PROPFIND request failed on '/svn/repos

svn: svn.igniterealtime.org: svn.igniterealtime.org

I am using Eclipse 3.3 and Subclipse version 1.2.3 on MAC OS. I am using SVNKit(Pure Java) instead of JavaHL (JNI) interface (under Windows->Properties->Team->SVN) because was unable to use the plugin with JavaHL and I can checkout code from local repositories without any problems.

Any suggestions how to fix the problem?

Hi monika,

I’m on XP and also using SVNKit. Sometimes I do get some errors connecting, which I suspect due to the problem on svn.igniterealtime.org. At other times it works perfectly. Are you getting this all the times? If so, try to connect to other remote svn site like for example http://svn.slushpupie.com/svn/openfireplugins. Are you getting the same error?

BTW, I suggest that you post your problems or questions in its proper place instead of through this comment section so that you have better chance of getting help.

1 Like

Hi All,

I have to start work on Openfire’s Plugin development. Besides setting up the Eclipse IDE for the Openfire project, is there anything else that i would need to do? Following explains the kind of work enviornment I am looking at:

I am using a Smack client to send some data objects to the plugin application. The plugin application will do some processing on the data objects and will send those back to the Smack client. Thus, for me to debug this application correctly, Openfire is required to be listening to the incoming XMPP packets inside the Eclipse enviornment.

Please let me know if it is possible with the Eclipse setup mentioned in this document. I would be highly obliged for any help in this regard.

Hi,

Please refer to http://www.igniterealtime.org/community/docs/DOC-1200.

Also, this is a place for comments. You may also rate this document by clicking on the stars. If you have questions please post it at the forum space, not here.

1 Like

Hi Azindin,

I am facing a problem in posting on the discussion forum. My browser is not able to download that page completely as some JavaScript errors are appearing with the download of some images. I checked other pages of your website and they are working fine. Problem is coming with the “New” or “Reply” post page. (It may be due to text editor). Please help me to fix that. If it is not faced by others then please let me know.

Sorry to bother you again by posting a message here but I think I do not have any other option

Best Regards,

NG

Hi Nitin,

I think I know what you mean because I get the same problem once in a while. I suspect that Clearspace, which run IgniteRealtime is not so friendly with bad connections and low bandwidth problems. Such problems may have its root at Jive’s own service provider… I’m not sure. Let alone the fact that you’re connecting from India… if you know what I mean. The impact is very obvious in Clearspace’s text editor. Here’s how I handle the matter:

When you click “New” or “Reply”, give the page some time to load. Your browser may have some kind of indication that the page is loading. If you sense that the loading starts to loop, click on your browser’s “Back” button, and finally on the “Next” button to get back to the faulty page. This way, you’re letting the browser load some of the things from its cache and run Javascripts properly.

Hope that helps.

Hi Vijay,

I think you’re trying to setup Eclipse for Spark, which is explained in Spark SVN + Eclipse 3.3 + Subversive Installation Guide instead.

BTW, there’s a discussion about the GSSAPIConfiguration in Re: Building Spark from source. Hope that helps.

It’s best that you leave this space only for comments on the document. Your question is more suitable to be posted on the Spark forum or so.

BTW, you might want to consider giving some stars to rate this document

Hi:

This worked a treat for me … right out “out of the box.” Now to try to figure out why I can’t get http-bind to work.

thanks for the good work!

Rich

Sorry about the long wait. By now perhaps you’ve figured out the solution: Try to define openfireHome as -DopenfireHome=“target/openfire”

THIS IS A REALY GREAT DOCUMENT !!! thank you !

Thanks for wonderfull article…

i lived error somethink like this :

log4j:WARN No appenders could be found for logger (org.jivesoftware.util.Log).
log4j:WARN Please initialize the log4j system properly.
Could not locate home

Than, , changed

-DopenfireHome=“target/openfire”

to

-DopenfireHome=“C:\Users\username\workspace\openfire\target\openfire”

then it worked for me. But i still get the

log4j:WARN No appenders could be found for logger (org.jivesoftware.util.Log).
log4j:WARN Please initialize the log4j system properly.

error. it is about with log4j logging system. i could not find it from project for now

Something like two days ago we switched to the third party slf4j library, therefore you have to include the build\lib\dist folder to the classpath. I’ve updated this document to reflect this. It’s under Project Builder the line:

  • Click on the Advanced… and Add Folders buttons once again to include openfire::build::lib::dist folder.

Hi Guenther.

I am planning to use Openfire for chat application. But i need a plugin. I need to translate every message before send to destication. I am newbie on Openfire and if you think that you can help me i will pay your help.

turkmenboy [ a t ] hotmail. com is my email address.

thanks.

Why I’m having this error:

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jivesoftware.launcher.Startup.start(Startup.java:83)
at org.jivesoftware.launcher.Startup.main(Startup.java:33)
Caused by: java.lang.ExceptionInInitializerError
at org.jivesoftware.LoginDialog$LoginPanel.(LoginDialog.java:233)
at org.jivesoftware.LoginDialog.invoke(LoginDialog.java:133)
at org.jivesoftware.Spark.startup(Spark.java:165)
… 6 more
Caused by: java.util.MissingResourceException: Can’t find bundle for base name i18n/spark_i18n, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427 )
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:705)
at org.jivesoftware.resource.Res.(Res.java:32)
… 9 more

taking question to forum…

This tutorial is old but I’ll going a make a new one based on it.

Possible issuse: mabe you use other JDK than oracle (eg. openJDK) so you must download and import Java Cryptography Extension - jce (javax.crtypto package) from the link bellow:

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-dow nloads-java-plat-419418.html#JCE-1_2_2-G-JS

Note: download final stable release source code from github because nightly builds are under development and may have some bugs and error.

org.jivesoftware.util.LocaleFilter file is full of compilation errors. While running the openfire,

it throws below exception :

Exception in thread “main” java.lang.Error: Unresolved compilation problems:

The import org.xmpp.packet cannot be resolved

JID cannot be resolved to a type

JID cannot be resolved to a type

JID cannot be resolved to a type

JID cannot be resolved to a type

JID cannot be resolved to a type

JID cannot be resolved to a type

JID cannot be resolved to a type

JID cannot be resolved to a type

The method getAdminAccounts() from the type AdminManager refers to the missing type JID

The method getAdminAccounts() from the type AdminManager refers to the missing type JID

at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:101)

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

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:113)

at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:58)

I fixed a few errors coming earlier by adding required jars manually, but for this i am not able to either find any jar files nor able to fix it by changin various run configuration arguments, as suggested in above comments. Please suggest.

1 Like