powered by Jive Software

How to run openfire on eclipse

I have followed the instructions at

http://www.igniterealtime.org/community/docs/DOC-1020

This went fine except that I could not do

Create Project Builder

  • 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.

I had to add this after.

I did the installation process and use a mysql database.

I can run the installation fine and everything works. I can also debug openfire (e.g. the plugins).

But when I change the jsp files these are not reflected in the code I run.

I run from

http://127.0.0.1:9090/index.jsp

In eclipse my project structure looks like the following

http://iybspq.bay.livefilestore.com/y1ptsus6cgH5jiDm9d8j9RlbUcVRQhefMunDSXXWqlL6 dnZUBu5Sk_dvOUc5V8uW7hSKltUgscM3Ljz6_WsKGuP5f-TFbBHLJ/untitled.JPG

as you can see I get a > before the filename to the jsp I have changed.

Also my openfire project is using the openfire in svn but I guess I still should be able to change it?

Hope someone can help me with this

I can run the installation fine and everything works. I can also debug openfire (e.g. the plugins).

But when I change the jsp files these are not reflected in the code I run.

Eclipse didn’t build the JSPs automatically (at least on my desktop) so you have to build it manually.

  • For the console navigate to the project directory and run $ ant -f build/build.xml.
  • In eclipse click Window::Show View::Ant menu. On the Ant screen, expand the Openfire XMPP Server and double-click on openfire ant task.

yea I figured this out.

but isnt there another easier way of doing it?

Like in normal developement the changes are compiled automatically

Hi,

I am facing same issue…

I made some changes into .jsp file but changes are not reflacted…

Can some one help on this.

Thanks

Dear,

You can add below argument to the VM arguments, then have a try.

-DdevelopmentMode=“true”

Hi Cheng,

I made this changes but got below error…

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/D:/workspace/openfire/build/lib/dist/slf4j-log4j12.jar!/org/slf4j/im pl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/C:/Users/Tushar/workspace/openfire/build/lib/dist/slf4j-log4j12.jar! /org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/D:/workspace/openfire/work/lib/slf4j-log4j12.jar!/org/slf4j/impl/Sta ticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

Database setup or configuration error: Please verify your database settings and check the logs/error.log file for detailed error messages.

java.lang.IllegalArgumentException: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.ConnectException

MESSAGE: Connection refused: connect

STACKTRACE:

java.net.ConnectException: Connection refused: connect

at java.net.DualStackPlainSocketImpl.connect0(Native Method)

at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)

at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)

at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)

at java.net.AbstractPlainSocketImpl.connect(Unknown Source)

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.SocksSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.(Unknown Source)

at java.net.Socket.(Unknown Source)

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)

at com.mysql.jdbc.MysqlIO.(MysqlIO.java:271)

at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)

at com.mysql.jdbc.Connection.(Connection.java:1555)

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConn ectionBuilder.java:39)

at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)

at org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:211 )

at org.logicalcobwebs.proxool.ProxoolDriver.connect(ProxoolDriver.java:89)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnec tionProvider.java:86)

at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:124)

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:760)

at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:486)

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

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)

** END NESTED EXCEPTION **

Last packet sent to the server was 0 ms ago.

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:770)

at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:486)

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

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)

Caused by: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.ConnectException

MESSAGE: Connection refused: connect

STACKTRACE:

java.net.ConnectException: Connection refused: connect

at java.net.DualStackPlainSocketImpl.connect0(Native Method)

at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)

at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)

at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)

at java.net.AbstractPlainSocketImpl.connect(Unknown Source)

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.SocksSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.(Unknown Source)

at java.net.Socket.(Unknown Source)

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)

at com.mysql.jdbc.MysqlIO.(MysqlIO.java:271)

at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)

at com.mysql.jdbc.Connection.(Connection.java:1555)

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConn ectionBuilder.java:39)

at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)

at org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:211 )

at org.logicalcobwebs.proxool.ProxoolDriver.connect(ProxoolDriver.java:89)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnec tionProvider.java:86)

at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:124)

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:760)

at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:486)

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

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)

** END NESTED EXCEPTION **

Last packet sent to the server was 0 ms ago.

at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:151)

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:760)

… 9 more

Error starting the server. Please check the log files for more information.

Server halted

Thanks

Hi All,

Is any one have solution for this…

Changes into .JSP file is not reflacted…

Please if anybody have a solution then let me know

There are two ways of solving this problem

  1. Build your openfire and/or plugins with the supplied ANT script (build.xml). It will auto-compile JSP files at build time provided you put them in the right place.

  2. Replace the jasper-compilerxxxx.jar files in OPENFIRE_HOME/lib with the ones from Jetty or even Tomcat and your JSP files will be auto-compiled at run time.

Hi All,

We have got the solution and now it is working fine…

Would you be so kind to share your solution so that others can learn from you

Hi All,

I tried many times with clean and build option but my .jsp file changes are not reflacted on the server…

i did same thing but with diffrent way…

1)Use JSPC (decrypted java compiler) to clean all .jsp files before compiling whole project using

JSPC ANT Task

2)And then just clean and refresh the project and then run…

Still if you face any issue then let me know i will give solution in more details.

Thank you

Hi, sir i am deploying openfire project in eclipse , will u help me out

com.tangosol some buddy send me the link for .jar file please.?

com.tangosol some buddy send me the link for .jar file please.

com.tangosol some buddy send me the link for .jar file please.

Dear sir,

Description
Resource
Path
Location
Type
The type com.tangosol.run.xml.XmlElement cannot be resolved. It is indirectly referenced from required .class files
ClusteringPlugin.java
/Project/src/plugins/clustering/src/java/com/jivesoftware/openfire
line 103
Java Problem
The project was not built since its build path is incomplete. Cannot find the class file for com.tangosol.run.xml.XmlElement. Fix the build path then try building this project
Project
Unknown
Java Problem

i am getting this error how to solve it , give me the solution.