Dear list,
we have been using the 'Register Virtual Stack Slices' Fiji plugin here at Goethe-University Frankfurt and it worked well so far. Now, we would like to be able to run our imaging pipeline headless on a cluster and ran into some problems. We used the jython script given at http://fiji.sc/wiki/index.php/Register_Virtual_Stack_Slices#Scripting_.2F_PlugIn. All works fine and the images get registered when we run the script normally, e.g.: /path_to/Fiji.app/ImageJ-linux64 ~/our_jython_script.py But when using Fiji in headless mode (as described at http://fiji.sc/wiki/index.php/Headless) like this: /path_to/Fiji.app/ImageJ-linux64 --headless ~/our_jython_script.py we get the error message attached to the bottom of this message. Is it even possible to run 'Register Virutal Stack Slides' in headless mode? Has anybody done this? Or are we doing something wrong? (We are using the latest version of Fiji under 64bit Linux. Please ask if you need more information on our installation, I will provide it asap.) Greetings from Germany and thanks in advance for your help, -- Tim Schäfer PhD student Johann Wolfgang Goethe-University Frankfurt Institute of Computer Science, Molecular Bioinformatics +49 69 798-24655 www.bioinformatik.uni-frankfurt.de ---ERROR MESSAGE--- /path_to/Fiji.app/ImageJ-linux64 --headless ~/our_jython_script.py Traceback (most recent call last): File "/home/patrick/improWorkspace/5806/ImproImageRegistrationPlugin/regexec.py", line 1, in <module> from register_virtual_stack import Register_Virtual_Stack_MT java.lang.VerifyError: (class: register_virtual_stack/Register_Virtual_Stack_MT, method: run signature: (Ljava/lang/String;)V) Incompatible argument to function at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at org.python.core.SyspathJavaLoader.loadClass(SyspathJavaLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.python.core.Py.findClass(Py.java:774) at org.python.core.JavaImportHelper.isJavaClass(JavaImportHelper.java:182) at org.python.core.JavaImportHelper.tryAddPackage(JavaImportHelper.java:41) at org.python.core.imp.import_next(imp.java:640) at org.python.core.imp.import_name(imp.java:746) at org.python.core.imp.importName(imp.java:806) at org.python.core.ImportFunction.__call__(__builtin__.java:1232) at org.python.core.PyObject.__call__(PyObject.java:367) at org.python.core.__builtin__.__import__(__builtin__.java:1202) at org.python.core.imp.importFromAs(imp.java:884) at org.python.core.imp.importFrom(imp.java:860) at org.python.pycode._pyx0.f$0(/home/patrick/improWorkspace/5806/ImproImageRegistrationPlugin/regexec.py:14) at org.python.pycode._pyx0.call_function(/home/patrick/improWorkspace/5806/ImproImageRegistrationPlugin/regexec.py) at org.python.core.PyTableCode.call(PyTableCode.java:165) at org.python.core.PyCode.call(PyCode.java:18) at org.python.core.Py.runCode(Py.java:1204) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:200) at org.python.util.jython.run(jython.java:246) at org.python.util.jython.main(jython.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at imagej.ClassLauncher.launch(ClassLauncher.java:222) at imagej.ClassLauncher.run(ClassLauncher.java:159) at imagej.ClassLauncher.main(ClassLauncher.java:72) java.lang.VerifyError: java.lang.VerifyError: (class: register_virtual_stack/Register_Virtual_Stack_MT, method: run signature: (Ljava/lang/String;)V) Incompatible argument to function -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Tim,
I find the same error. Can you use a batch mode? ./ImageJ -batch ~/our_jython_script.py ignacio On Wed, Feb 5, 2014 at 3:24 PM, Tim <[hidden email]> wrote: > Dear list, > > > we have been using the 'Register Virtual Stack Slices' Fiji plugin here at > Goethe-University Frankfurt and it worked well so far. Now, we would like > to be able to run our imaging pipeline headless on a cluster and ran into > some problems. > > We used the jython script given at http://fiji.sc/wiki/index.php/ > Register_Virtual_Stack_Slices#Scripting_.2F_PlugIn. > > > All works fine and the images get registered when we run the script > normally, e.g.: > > /path_to/Fiji.app/ImageJ-linux64 ~/our_jython_script.py > > > > But when using Fiji in headless mode (as described at > http://fiji.sc/wiki/index.php/Headless) like this: > > /path_to/Fiji.app/ImageJ-linux64 --headless ~/our_jython_script.py > > we get the error message attached to the bottom of this message. > > > > Is it even possible to run 'Register Virutal Stack Slides' in headless > mode? Has anybody done this? Or are we doing something wrong? > > (We are using the latest version of Fiji under 64bit Linux. Please ask if > you need more information on our installation, I will provide it asap.) > > > > Greetings from Germany and thanks in advance for your help, > > > -- > Tim Schäfer > PhD student > > Johann Wolfgang Goethe-University Frankfurt > Institute of Computer Science, Molecular Bioinformatics > +49 69 798-24655 > www.bioinformatik.uni-frankfurt.de > > > > ---ERROR MESSAGE--- > /path_to/Fiji.app/ImageJ-linux64 --headless ~/our_jython_script.py > > Traceback (most recent call last): > File "/home/patrick/improWorkspace/5806/ImproImageRegistrationPlugin/regexec.py", > line 1, in <module> > from register_virtual_stack import Register_Virtual_Stack_MT > java.lang.VerifyError: (class: register_virtual_stack/Register_Virtual_Stack_MT, > method: run signature: (Ljava/lang/String;)V) Incompatible argument to > function > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:169) > at org.python.core.SyspathJavaLoader.loadClass( > SyspathJavaLoader.java:107) > at java.lang.ClassLoader.loadClass(ClassLoader.java:248) > at org.python.core.Py.findClass(Py.java:774) > at org.python.core.JavaImportHelper.isJavaClass( > JavaImportHelper.java:182) > at org.python.core.JavaImportHelper.tryAddPackage( > JavaImportHelper.java:41) > at org.python.core.imp.import_next(imp.java:640) > at org.python.core.imp.import_name(imp.java:746) > at org.python.core.imp.importName(imp.java:806) > at org.python.core.ImportFunction.__call__(__builtin__.java:1232) > at org.python.core.PyObject.__call__(PyObject.java:367) > at org.python.core.__builtin__.__import__(__builtin__.java:1202) > at org.python.core.imp.importFromAs(imp.java:884) > at org.python.core.imp.importFrom(imp.java:860) > at org.python.pycode._pyx0.f$0(/home/patrick/improWorkspace/5806/ > ImproImageRegistrationPlugin/regexec.py:14) > at org.python.pycode._pyx0.call_function(/home/patrick/ > improWorkspace/5806/ImproImageRegistrationPlugin/regexec.py) > at org.python.core.PyTableCode.call(PyTableCode.java:165) > at org.python.core.PyCode.call(PyCode.java:18) > at org.python.core.Py.runCode(Py.java:1204) > at org.python.util.PythonInterpreter.execfile( > PythonInterpreter.java:200) > at org.python.util.jython.run(jython.java:246) > at org.python.util.jython.main(jython.java:129) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke( > NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at imagej.ClassLauncher.launch(ClassLauncher.java:222) > at imagej.ClassLauncher.run(ClassLauncher.java:159) > at imagej.ClassLauncher.main(ClassLauncher.java:72) > > java.lang.VerifyError: java.lang.VerifyError: (class: > register_virtual_stack/Register_Virtual_Stack_MT, method: run signature: > (Ljava/lang/String;)V) Incompatible argument to function > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- Ignacio Arganda-Carreras, Ph.D. Seung's lab, 46-5065 Department of Brain and Cognitive Sciences Massachusetts Institute of Technology 43 Vassar St. Cambridge, MA 02139 USA Phone: (001) 617-324-3747 Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Ignacio,
On Thu, 6 Feb 2014, Ignacio Arganda-Carreras wrote: > I find the same error. If you make an easy-to-reproduce package for me, I will fix it. Ciao, Dscho -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hello Johannes,
I cannot attach a script file to this e-mail, so just copy the following two lines to a script call "test-dscho.bsh": import register_virtual_stack.Register_Virtual_Stack_MT; p = new Register_Virtual_Stack_MT.Param(); And run it like this: $ ImageJ --headless test-dscho.bsh It seems the headless mode doesn't like the call to the constructor of the inner class "Param". Thanks for your help! On Thu, Feb 6, 2014 at 4:01 PM, Johannes Schindelin < [hidden email]> wrote: > Hi Ignacio, > > On Thu, 6 Feb 2014, Ignacio Arganda-Carreras wrote: > > > I find the same error. > > If you make an easy-to-reproduce package for me, I will fix it. > > Ciao, > Dscho > > -- > Ignacio Arganda-Carreras, Ph.D. > Seung's lab, 46-5065 > Department of Brain and Cognitive Sciences > Massachusetts Institute of Technology > 43 Vassar St. > Cambridge, MA 02139 > USA > > Phone: (001) 617-324-3747 > Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by dscho
Hi Ignacio,
On Sat, 8 Feb 2014, Ignacio Arganda-Carreras wrote: > Here you are a script that reproduces the error. Just run it like this: > > $ ImageJ --headless test-dscho.bsh > > It seems the headless mode doesn't like the call to the constructor of the > inner class "Param". Here is what I did: keeping in mind that a VerifyError is thrown when bytecode is loaded into a class loader (*long* before it is executed, if it is executed at all), I commented out method by method, returning true or null when necessary, and running your script every single time, until the error went away. Then I reverted the comments partially, until I got at the offending lines. See https://github.com/fiji/fiji/pull/68 Ciao, Dscho -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |