Failed to run Spark (using NetBeans)

Greetings,

pleeeaaasseee help me , i got this exception while running the Spark using NetBeans:

Exception in thread “AWT-EventQueue-0” java.lang.UnsatisfiedLinkError: no tray in java.library.path

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)

at java.lang.Runtime.loadLibrary0(Runtime.java:822)

at java.lang.System.loadLibrary(System.java:992)

at org.jdesktop.jdic.tray.internal.impl.GnomeSystemTrayService.(Spark.java:35)

at com.jivesoftware.Spark$1.run(Spark.java:115)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 242)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:16 3)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Note: i followed the steps in thread @ http://www.jivesoftware.org/community/thread.jspa?messageID=129749#129749

(i anted build.xml), added all *.jar files in the Sparkplugs/spark/lib, Sparkplugs/spark/lib/windows and Sparkplugins/spark/resource

to the CLASSPATH.

so please help, i can’'t think of anything else

Hello,

Tray is a native lib. ( Tray.dll ).

Try to add a JVM parameter to the run properties:

-Djava.library.path=“C:…\Sparkplugs\spark\lib\windows”

or the following to Linux:

-Djava.library.path=“C:…\YourSparkLibDir\linux”

Regards,

Thiago

Hi,

Spark now gives out no more exceptions to run, (coz i added spark/src/java and spark/src/resources to the project source),

but still no response after running, the following message is shown in the NetBeans output, nothing else appear:

init:
resources:
base:
Building jar: D:…\sparkplug_kit_1_1_0\sparkplugs\spark\target\build\lib\base.jar
build:
build_tests:
run_tests:
BUILD SUCCESSFUL (total time: 2 seconds)

(by the way Thiago, how to add JVM parameter to the run properties?

i’'ve chosen project properties > run>added ant target: Djava.library.path="…\Sparkplugs\spark\lib\windows" in the same field,

is that right?)

and is there any output jar/folder to add here: project properties–> output ??

Thanks in advance

Which ant target are you running?

Have you tried “ant run” ???

Please explain what is your issue here.

Regards,

Thiago

Hi,

my issue is why the login window doesn’'t appears when running Spark?

(though no exceptions are given)

AND

how to do the following in NetBeans:

add a JVM parameter to the run properties:

-Djava.library.path=“C:…\Sparkplugs\spark\lib\windows”

Are you trying to run with ant run in NetBeans or using the netBeans run???

You can set JVM parameters in RUN properties in netbeans.

Inside NetBeans:

Right click on the project folder >> Properties>> Run >> VM Options

sorry Thiago, i can’'t find the ‘‘Run’’ item in the project properties :-o

i only find: java sources, classpath, build and run, output.

i even can’'t set the project main class; Spark

AND can’'t use Run --> Run file (this menu is inactive)

Note: when i run startup.bat in spark/target/build/bin, i got that exception in thread “main”:

java.lang.NoClassDefFoundError: org/jivesoftware/Spark

so, any idea what should i do?

Try “build and run” menu.

Look for JM Parameter or JVM Parameter.

Try to run it directly from your IDE instead running .bat file

Choosing the Main Class Spark that is located into spark.jar

Regards,

Thiago

Hi There,

I am also compiling Spark on a Mac in Netbean. It compiles alright but when I go to run it says that no main class is defined. It list a bunch of classes that I can pick from but spark.jar is not listed? Can any one suggest the next step in fault finding?

Paul

I don’t know Mac, but refer to the startup.bat and startup.sh files in src\resources to know what your classpath should be and where the entry point is.

My Netbeans project is a “Java Free-Form Project”, so I created an extra build target in Ant to run the project.