Cannot Compile Spark at all :(

Hello, I checked out the SVN for spark today and tried to compile it in netbeans, and I get 100 errors and 5 warnings.

I think that It has alot to do with packages not being available, but i have spent an hour downloading packages and everytime I add one it will be unable to find another 100…

Is netbeans not good for developing spark? Or is there a list of Packages that I require?

Also is there a way to automatically download all the required packages?

Any help would be greatly appreciated.

Thanks,

-Dean

Hi DeanC,

I cannot say anything about netbeans, but as far as I saw required libraries are located (after svn checkout) under:

(checkout_dir)/build/lib

Try adding all the libraries in that folder (and all it’'s subfolders) to your classpath.

That’'d be my 2cents

Greetings,

miguy2k

Still no go, I have added the JARS to my class path and i no longer get the dependency errors and it does say that it is compiled, but i get the following errors/exceptions.


Exception in thread “AWT-EventQueue-0” java.lang.ExceptionInInitializerError

at org.jivesoftware.LoginDialog.updateProxyConfig(LoginDialog.java:765)

at org.jivesoftware.LoginDialog.invoke(LoginDialog.java:112)

at org.jivesoftware.Spark.(Default.java:51)

… 13 more

Caused by: java.lang.NoClassDefFoundError: IllegalName: org/jivesoftware/resource/default

at java.lang.ClassLoader.preDefineClass(ClassLoader.java:476)

at java.lang.ClassLoader.defineClass(ClassLoader.java:614)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

at java.net.URLClassLoader.access$000(URLClassLoader.java:56)

at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2370)

at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1400)

at java.util.ResourceBundle.findBundle(ResourceBundle.java:1365)

at java.util.ResourceBundle.findBundle(ResourceBundle.java:1294)

at java.util.ResourceBundle.findBundle(ResourceBundle.java:1294)

at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1236)

… 15 more


Any ideas? Also what is the best IDE for development? Is netbeans ok?

Allthough I don’'t like it, I can only speculate about the reason why you keep getting the error…

My guess whould be that the error happens somewhare in the static stuff in Default.java, but I’‘d need to reproduce the error and debug to see exactly what’'s happening…

You are compiling inside your IDE, right? Does the ant build work? If yes, then it’‘s probably something in yout IDE’'s configuration…

Personally, I am not a Spark developer, so I don’'t know what IDE they use to develop it… (but it would be interresting knowing it )

Infortunately, that’'s all the help I can give you so far…

Hope you’'re gonna figure it out!

Greetings,

miguy2k

geting closer!!

I am able to compile using the ant script so it has to be something to do with the IDE setup, I have finally got eclipse working and it only gets 2 errors:-

“The project was not built since its build path is incomplete. Cannot find the class file for javax.net.SocketFactory. Fix the build path then try building this project”

and

“The type javax.net.SocketFactory cannot be resolved. It is indirectly referenced from required .class files”

Any clues? I was also wondering what tools are the best to do GUI development?

Thanks,

-Dean

OK, I know eclipse quite well, it’'s the IDE I work with all day…

That’'s (again) a classpath problem… Go into project properties of the spark eclipse project, select “Java Build Path” and see if all libs from build/libs are present in the list. If not, add all missing ones.

That should do it

Greetings,

miguy2k

Add resources folder to your source path. And then run it again.

Another point is that new Spark needs the latest JDK 1.5 to build ´n run.

And remember to run ant jar before trying to run it from an IDE.

Regards,

Thiago

I am having the same exact issues. Was anyone able to solve this. I am using Eclipse 3.4. I can compile from commandline without any problem,but in eclipse I get this error:

I encountered the same problem, but resolve it by doing the following:

  1. Go to the project

  2. Right click and select Build Path->Conifgure Build Path

  3. Click on the Libraries tab

  4. Select the rt.jar file (part of the JRE) if visible

  5. Click Remove (buttons are at the right hand side)

  6. Click on Add Library

  7. Select JRE System Library, then click Next

  8. Select Workspace default JRE (If one is not available, you have to Installed JREs)

  9. Click Finish

  10. Click OK

  11. Refresh

You should not see that error anymore. Good luck!

I create my Netbeans project as a “Java Free-Form Project”, so it uses the existing ant build script and then added the project dependencies in the classpath as necessary (as I also added the plugin folders to the project).

The only problem I’ve had though is that with version 6.7.1 it keeps showing errors that aren’t there, as if it were ignoring part of the classpath, but version 6.5.1 worked fine.

[Edit: Sorry only just realised that this thread is old]