powered by Jive Software

How to compile Openfire with Netbeans?

I cant get my Openfire SVN copy to compile with Netbeans. I have created the project as i did with Spark (and it is working) based on the doc http://www.igniterealtime.org/community/docs/DOC-1521 But it gives me an error:

clean:
Target “jar” does not exist in the project “Openfire”.
BUILD FAILED (total time: 0 seconds)

I see that build.xml says i need Ant nad jUnit. How should i install them or configure my project to use them?

Hi,

Don’t care about Ant and jUnit. They should already be installed and configured with Netbeans.

It seems Netbeans don’t read the default build target and is looking for a target called “jar”.

Add the line:

<target name="jar" description="Netbeans default build target" depends="openfire"/>

in the copied build.xml (see the attached screenshot). This defines the required target as a dependency of the openfire target.

Best Regards

Thanks. I have compiled it now. Took 36 secs Now i wonder how to launch. openfire.bat seems not working. I’m on Windows.

I don’t use windows, but you can use Netbeans for running Openfire, go to Run -> Run Main Project (see screenshot) or press F6. Then you should select the class org.jivesoftware.openfire.starter.ServerStarter and it should run. Or you could configure Java for Openfire (see Building the Source section 2: Setup Your Environment) and ensure that you start Openfire.bat from the openfire/bin directory. Maybe via commandline (go first via cd to the directory and then start Openfire.bat) or via a windows shortcut with the correct path (c:…PATH TO SVN…\target\openfire\bin) in “start in:”. Hopefully it helps.

Hi. Thanks again. Though Run command doesnt work for me. It wasnt working two days ago, but it was showing that window to select a package. Not it just shows errors about uncompilable source

Anyway. I had to add JAVA_HOME variable with C:\Program Files\Java\jdk1.6.0_13 value (will have to change that after JDK update). Now openfire.bat is launching java process and Openfire is running. I should read more documentation before doing anything Hm… i havent checked your patches yet, but i have found some strange issue. Hasnt been through the Openfire setup for years and it seems that you have to restart Openfire (with the embedded-db) before being able to login. Though the setup suggests to login at once. Going to start a discussion here. Maybe this should be filed (or maybe it is already) as a bug.

I hope you will see this new message, Guenther. I can’t compile Openfire with NetBeans again. It keeps complaining about MucManager, so i wonder could this be the last patch causing this? Errors:

Compiling 612 source files to D:\My Documents\JiveSoftware\Openfire\work\classes
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:1: class, interface, or enum expected
<<<<<<< .mine
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:855: class, interface, or enum expected

D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:868: class, interface, or enum expected
import org.jivesoftware.database.DbConnectionManager;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:869: class, interface, or enum expected
import org.jivesoftware.database.SequenceManager;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:870: class, interface, or enum expected
import org.jivesoftware.openfire.XMPPServer;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:871: class, interface, or enum expected
import org.jivesoftware.openfire.cluster.ClusterEventListener;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:872: class, interface, or enum expected
import org.jivesoftware.openfire.cluster.ClusterManager;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:873: class, interface, or enum expected
import org.jivesoftware.openfire.container.BasicModule;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:874: class, interface, or enum expected
import org.jivesoftware.openfire.event.UserEventDispatcher;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:875: class, interface, or enum expected
import org.jivesoftware.openfire.event.UserEventListener;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:876: class, interface, or enum expected
import org.jivesoftware.openfire.muc.cluster.;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:877: class, interface, or enum expected
import org.jivesoftware.openfire.muc.spi.LocalMUCRoom;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:878: class, interface, or enum expected
import org.jivesoftware.openfire.muc.spi.MUCPersistenceManager;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:879: class, interface, or enum expected
import org.jivesoftware.openfire.muc.spi.MUCServicePropertyEventListener;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:880: class, interface, or enum expected
import org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:881: class, interface, or enum expected
import org.jivesoftware.openfire.stats.Statistic;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:882: class, interface, or enum expected
import org.jivesoftware.openfire.stats.StatisticsManager;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:883: class, interface, or enum expected
import org.jivesoftware.openfire.user.User;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:884: class, interface, or enum expected
import org.jivesoftware.util.
;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:885: class, interface, or enum expected
import org.jivesoftware.util.cache.CacheFactory;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:886: class, interface, or enum expected
import org.xmpp.component.ComponentException;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:887: class, interface, or enum expected
import org.xmpp.component.ComponentManagerFactory;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:888: class, interface, or enum expected
import org.xmpp.packet.JID;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:890: class, interface, or enum expected
import java.sql.;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:891: class, interface, or enum expected
import java.util.
;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:892: class, interface, or enum expected
import java.util.concurrent.ConcurrentHashMap;
D:\My Documents\JiveSoftware\Openfire\src\java\org\jivesoftware\openfire\muc\MultiUse rChatManager.java:1706: class, interface, or enum expected

.r11097
27 errors
D:\My Documents\JiveSoftware\Openfire\build.xml:280: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 2 seconds)

Hi wroot, do you mean the createMUCService.patch2 from OF-27?

It worked fine for me, but Guus had also problems applying this last patch (some whitespace errors or so). A slightly modified version of the patch is already in trunk and also may cause problems if you try to apply the patch to the actual revision of the trunk.

If you use subversion it would be the easiest to revert the concerned files und update to the actual revision.

I have just syncronised my SVN version of the source and then tried to compile (yesterday). Do i have to manually revert files which were patched manually before? I thought syncing with SVN overwrite them with the trunk version automatically.

I thought syncing with SVN overwrite them with the trunk version automatically.

It should yes, but if there are conflicts it doesn’t work. Try svn status to see the affected files and revert them.

Now it works. Thanx! I have reverted local changes on /src dir.