[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Problem executing jar files



Aengus McCullough wrote:
I am having difficulty executing a Java job on Condor when it is
packaged as a Jar.  The same job runs fine when it is unpacked.  I am
getting the following error:

java.lang.ClassNotFoundException: gab142.jar not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/home/software/condor/condo
r-6.8.2_x86_64/lib/,file:/home/software/condor/condor-6.8.2_x86_64/lib/s
cimark2lib.jar,file:./,file:/condor/execute/dir_471/gab142.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.7)
   at java.lang.ClassLoader.loadClass(libgcj.so.7)
   at java.lang.ClassLoader.loadClass(libgcj.so.7)
   at java.lang.Class.forName(libgcj.so.7)
   at CondorJavaWrapper.main(CondorJavaWrapper.java:101)


I can see the problem is something to do with the condor_install_dir/lib
folder but I am not sure what exactly.  Can anyone help?  Also does
anyone know if "-jar" needs to be specified as one of the arguments when
submitting a .jar file to condor.

----------------submit file----------------------------
Universe                = java
Executable              = gab142.jar
jar_files               = gab142.jar
Arguments               = gab142.jar -i io3.txt
Output                  = gab142.out
Error                   = gab142.error
transfer_input_files    =  io3.txt
should_transfer_files   = YES
when_to_transfer_output = ON_EXIT
Initialdir = /home/users/a4131673

------------------------------------------------
Thanks,
Aengus

Aengus,

The manual doesn't seem to cover the case of an executable jar file. Probably because the Java universe predates them.

You should either specify the entry point to the jar on the Arguments line, i.e. Arguments = some.main.ClassFile -i io3.txt, or try passing -jar to the JVM via java_vm_args = -jar.

http://www.cs.wisc.edu/condor/manual/v7.1/2_8Java_Applications.html

Best,


matt