# What does this Java error mean? Why is it raised?

I want to launch some kernels on a cluster that uses SGE. The server's operating system is Linux Cent-OS. According to Mathematica documentation, I've added these commands inside my code:

Needs["CLusterIntegration"]
kernels=LaunchKernels[SGE["mnt-cluster.org"],8]

DistributeDefinitions[F]; (*F is defined in previous lines, and itself cannot be parallelized efficiently.*)
Parallelize[TST = Map[F, {a1, a2, a3, a4}]]; (*An example of what I want to be done on parallel nodes.*)

CloseKernels[kernels]


but once I ran it, these errors were raised:

Java::excptn: A Java exception occurred: java.lang.UnsatisfiedLinkError: no drmaa in java.library.path
at com.sun.grid.drmaa.SessionImpl\$1.run(SessionImpl.java:58)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.grid.drmaa.SessionImpl.<clinit>(SessionImpl.java:56)
at com.sun.grid.drmaa.SessionFactoryImpl.getSession(SessionFactoryImpl.java:59).
SGE::load: Cannot find components required for SGE. >>


and another time I ran it again the list of error has changed to only this one:

Java::excptn: A Java exception occurred: java.lang.NoClassDefFoundError: Could not initialize class com.sun.grid.drmaa.SessionImpl
at com.sun.grid.drmaa.SessionFactoryImpl.getSession(SessionFactoryImpl.java:59).
SGE::load: Cannot find components required for SGE. >>


I can find the file "drmaa" on the server on which I've installed Mathematica8.
I'd appreciate anyone who may help me to find out why these errors raised and how should I resolve them.

• A shared library that should be on the path is missing or the path is incorrect. Is the location you found drmaa (is that drmma.so?) in your path (not classpath)? – Ymareth Dec 9 '14 at 17:47
• @Ymareth That time I faced the problem, according to this MathGroup archive, I updated my CLASSPATH to where I found drmaa.jar, which was compeletly different with the addresses in the above link. But I didn't found the others: jgdi and juti. – Toughee Dec 18 '14 at 4:22
• @Ymareth I also can find drmaa.so and drmaa.so.1.0 inside a folder besides drmaa.jar` not exactly in the path. – Toughee Dec 18 '14 at 4:25
• What are your values for the PATH and LD_LIBRARY_PATH environment variables? This is to do with loading native shared libraries it is (I believe) nothing to do with CLASSPATH. – Ymareth Dec 18 '14 at 9:52