I am using Eclipse, and I mostly followed this guide Openfire SVN + Eclipse 3.3 + Subversive Installation Guide , to get my stuff running.
For reference , I am telling you what I did:
-
Extracted the openfire_src to Desktop (my Eclipse workspace directory is F:\Users\Harsh\git\Reminder )
-
Clicked on file->new project-> java project. This is what my settings dialog looks like :
-
After clicking on finish, I followed these steps:
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.
Now, when I try to run my project, It shows :
Openfire 3.10.0 [May 17, 2015 9:27:17 PM]
Admin console listening at http://harsh-pc:9090
But when I access the address ( or localhost:9090) , I get this error:
java.lang.NullPointerException
at org.jivesoftware.admin.AdminConsole.getAppName(AdminConsole.java:137)
at org.jivesoftware.openfire.admin.decorators.setup_jsp._jspService(setup_jsp.java :177)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:595)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 3)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:11 27)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185 )
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:106 1)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:115)
at com.opensymphony.module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.ja va:156)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:59)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)
at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)
at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:159)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 3)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:11 27)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185 )
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:106 1)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635 )
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Unknown Source)
How do I solve this problem ?
My main objective is to be able to write plugins for openfire
Thank you