Problems building WildFire in Eclipse SDK 3.1.2

Hi everyone. Please forgive a Java newbie for this simple question, but I have been spending too much time already with this stupid problem.

I’'m trying to build WildFire server with Eclipse SDk 3.1.2. I have found and set the Compiler complaince level to 5.0, and that removed a couple of thousand compiler errors…

Now I get these:

The import javax.net.ssl.SSLSocketFactory cannot be resolved

The import javax.net.ssl.SSLContext cannot be resolved

The import javax.net.ssl.TrustManager cannot be resolved

etc etc

It alls seems related to a missing SSL library.

Now how do I add this library to Eclipse so I can build?

Thanks a million!

//Peter

[/nobr]Hi Peter,

did you read the Building the Source Guide and thus are using Ant to build Wildfire?

I’'m using Eclipse 3.1.1 without problems.

LG[nobr][/nobr]

(edited - repaired %20 in link)

No, I created a new “Java Project from Existing Ant Buildfile”, and it seemed to load correctly? Are you saying that this wont work?

I havent tried the manual cmdline-approach yet (spoiled Windows programmer talking here…)

Thanks

Peter

Hi,

this is the old documentation, very good for windows. The new one seems to be much shorter and not detailed any more. There they did describe another way I did follow to set it up (also on windows), not using the ant file directly.

Eclipse

Step 1:

Download the latest version of Eclipse and install it by extracting the contents zip or tar.gz file to where ever you typically install your applications.

Step 2:

a. Start up Eclipse.

b. Dismiss the Welcome screen by clicking on the arrow in the upper right hand corner.

c. Go to Window ? Open Perspective ? Java

d. Go to Window ? Show View ? Ant

e. Go to Window ? Show View ? Package Explorer

f. In the Package Explorer window right-click, select New ? Project. Make sure the Java Project option is selected and click on the “Next” button. Enter a name in the project name field and then click on the “Create project at external location” radio button, use the “Browse” button to point Eclipse to the directory you extracted the Messenger source to, then click on the “Next” button. If all goes well, Eclipse will figure out all the libraries that Messenger needs as well as where all the various .java source files are stored, click on the “Finish” button.

g. In the Ant window right-click, select Add Buildfile, and then in the dialog that appears expand the tree to show the build directory, when you do that you should see the build.xml file double-click on it and the dialog will go away.

h. Now, in the Ant window you can expand the “Messenger XMPP Server” entry and see all the various targets. To run any of the targets simply double-click on it. As with the basic tools typically you’'ll just stick to using ‘‘ant jar’’ and ‘‘ant plugins’’.

LG

Thanks for helping out.

I got exactly the same result this time. It just seems that I am missing javax.net.ssl somehow. Beeing new to java I dont really know where to look/what to look for either. I have downloaded the latest JRE and the SDK. I have also downloaded Eclipse as well as NetBeans IDE 5.0. Before installing all this, I had a trading application that also installed a Java runtime. Conflicts??

Oh well, I guess I have to learn Java properly before diving into complex projects. I just wanted to build and debug WildFire to see if it was suitable for a project we’'re planning.

Thanks anyway.

update: Building with ANT from the cmdline works fine. Now I only need to figure out why Eclipse gives me 118 errors using the same code…

//Peter

update: by opening the .classpath file, and adding the jsse.jar file there, the build errors are now gone! (but 273 warnings are still there…)

When running/debugging however, it crasches almost immediately. I have set WILDFIRE_HOME to c:\java\wildfire.

Ideas anyone?

/Peter

Hi Peter,

are you sure that Eclipse is using the right JRE to run Wildfire within eclipse? And the rifht JDK to compile things? The “Java Build Path” (Configure, Configure Build-Path, Libraries) should contain “JRE System Library 150_06” and there the jsse.jar is included.

What messages do you get when it crashes and what are you doing?

A log file/stack trace would be nice.

LG

Hello and thanks for helping me out!

The menus must have changed because I cant find a Configure menu. Please see the following screenshots for my configuration:

http://fsh.dnsalias.com/scr1.jpg

http://fsh.dnsalias.com/scr2.jpg

http://fsh.dnsalias.com/debug1.jpg

http://fsh.dnsalias.com/debug2.jpg

http://fsh.dnsalias.com/debug3.jpg

I’'m sure I have messed up the parameters, since I have only guessed from reading wildfire.bat.

If you an spot and correct the errors I would be grateful

Thanks

Peter

PS. I want to add that the errors differ when I change the arguments, but they all indicate basic problems like class not found, or file not found DS

Message was edited by: fshsweden

Hi Peter,

if you right click on “Wildfire XMPP Server” you should be able to find the configure menu. Well my error, it’'s (Build-Path, Configure Build-Path, Libraries).

But scr2.jpg shows the build path, for me the last line reads “JRE System Library 150_06” and if expand it (click +) then these JAR’'s are included: rt.jar jsse.jar jcse.jar

Maybe this is an Eclipse issue, I will install the new version in some days.

In none of your screenshots I’'m able to see the ant window. I usually build everything (double click “all”) and then right-click “run”->Debug As->Ant Build.

I use the default wildfirehome and have no problems, actually if you start it like this you’'ll have problems to find a place to change it.

LG

Hi again,

Well on my Eclipse, its Right-click, properties, Java Build Path and then the Libraries Tab.

I cant find a JRE system library anywhere, just the “JRE_LIB=C:\Java\jdk1.5.0_06\jre\lib\rt.jar”

Anyway, since I can build it, it’'s not an important thing to solve right now, is it? I just add jsse.jar now and figure out later why was it was needed.

Anyway, when trying the last of your suggestions, I get


snip -


Buildfile: C:\EclipseWs\Wildfire XMPP Server\build.xml

Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

BUILD FAILED

C:\EclipseWs\Wildfire XMPP Server\build.xml:35: taskdef class org.jivesoftware.ant.SubDirInfoTask cannot be found

Total time: 547 milliseconds


snip -


When I do “Project - Clean” however, it builds nicely…!?

If possible, it would be great if you could install the latest eclipse and the latest jdk on a test system and document the steps needed to get it to work, since you seem to know your way around there. Apparently there are enough things that are changed between the Eclipse versions to make the existing descriptions useless.

I’'m sure its not just me who would love to have such a “HOWTO build WildFire using Eclipse 3.1.2”

Thanks for all help

Peter

Hi Peter,

it seems that you are doing something evil, maybe the location where you extract wildfire or how you did name the project causes some trouble.

My notebook has now Eclipse 312 and so I can post a step-by-step instruction.

LG

Install jdk-1_5_0_06-windows-i586-p.exe (or just copy the files to

%programfiles%\Java so you’'re registry is not modified)

Extract eclipse-SDK-3.1.2-win32.zip to C:\Tools\

Start C:\Tools\eclipse\eclipse.exe and set

Workspace to C:\ws\eclipse\workspace\

If start fails because no javaw.exe is found add

%programfiles%\Java\jdk1.5.0_06\bin to the PATH

variable manually and start it

Close the Welcome screen

Menu Window, Preferences; Java, Compiler:

“Compiler Compliance Level:” 5.0

Exit Eclipse

Extract wildfire_src_2_4_4.jar to C:\ws\eclipse\workspace\

Start Eclipse

Select File, New, Project;

Java Project ;

Project Name “wildfire_src” (JDK Compliance and

Projct layout will get disabled) ;

Menu Window, Show Wiew, Ant;

Right click in “Ant”, “Add Buildfiles”

Select wildfire_src\build\build.xml

Double click “all” … and wait to complete the build

Right click “run”, “Debug As”, “1 Ant Build”

/code

Hello again,

Thanks a million for your hard work in explaining this to me. We are almost there, but not quite! Please bare with me for just a few more questions.

Question 1: When doing as you say, it builds and it runs, however my breakpoints are never reached?!? Is it really running in the debugger??

Question 2: Is this the normal way of importing an external project into Eclipse?? My error was that I created a new project using “Java Project from existing Ant Buildfile” (which seems to be what this project is, right?). Why cant I do it this way instead? Actually, I didnt get any errors when doing this, they came later as I specify in Q3.

Question 3: I want to run the app in the debugger by using the Run - Debug menu items, which seems more natural to me than using the Ant script, but maybe thats just because I’'m accustomed to the Windows way of doing things. The problem is that this keep failing for me. I just cant get the arguments in the debug configurations dialog correct.

Again, thanks for spending all this time with a Java/Eclipse n00b. Hopefully I’'ll be able to pay back when I get up and running.

//Peter

Hi Peter,

@Q1: ant is run in the debugger, not Wildfire … that’'s not what I expected and you wanted, see Q3.

@Q2: I don’'t know

@Q3:

Menu Run, Debug …: New

Project: wildfire_src

Main class: com.install4j.runtime.Launcher

Program Arguments:

start org.jivesoftware.wildfire.starter.ServerStarter

false false

“./logs/stderror.log”

“./logs/stdoutt.log”

true true false “” true true 0 0 “” 20 20 “Arial” “0,0,0” 8 500

“version 2.4.4” 20 40 “Arial” “0,0,0” 8 500 -1 start

VM Arguments:

-DwildfireHome="."

-Dinstall4j.appDir="."

-Dexe4j.moduleName="./bin/wildfire"

-Dwildfire.lib.dir="./lib"

-Dinstall4j.jvmDir=“C:/Program Files/Java/jre1.5.0_06”

Workspace:

C:\ws\eclipse\workspace\wildfire_src\target

Classpath: Advanced … Add Folders OK

wildfire_src\src\resources\jar OK

Classpath: Advanced … Add Folders OK

wildfire_src\resources OK

Apply

Debug

/code

LG

Buildfile: C:\workspace\Wildfire\Wildfire XMPP Server\build.xml

Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

BUILD FAILED

C:\workspace\Wildfire\Wildfire XMPP Server\build.xml:35: taskdef class org.jivesoftware.ant.SubDirInfoTask cannot be found

Total time: 390 milliseconds

i get the following error i am unable to figure out what the problem might be

Hallo!

I am using Eclipse 3.2.2 and ich guess I have the same problem.

I played a litte bit with then it compiled correctly. I replaced the Java compiler by Ant.

It compiles but I get error messages by Eclipse (not by the ant script)

It tells me it can’'t find org.gjt.xpp.XmlPullParserException.

The file (seems to be a JUnit-Test for a plugin) where the error is caused by is called ContentFilterTest.java

Can someone help me?

Message was edited by: FischeFr

Message was edited by: FischeFr

I think you can safely delete that file from the Eclipse project!

Peter

You were right. I did it and there is still one error due to the missing org.gjt.xpp.XmlPullParserException.

“The project was not build since its build path is incomplete. Cannot find class file for org.gjt.xpp.XmlPullParserException.”

…but it WAS built!!! :-[

Are there any further ideas?