clEsperanto / clij3

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Issue when running clij3 from update site #14

Closed StRigaud closed 2 weeks ago

StRigaud commented 2 weeks ago

I build on Ubuntu and added clij3.jar and clesperantoj.jar to the clij3 update site. In a fresh new fiji, I added the clij3 update site and runned the jython demo

Traceback (most recent call last):
  File "/data/clesperanto/clij3/demo/basic_demo.py", line 14, in <module>
    imp_res = cle.pull(gpu_result)
    at net.clesperanto.imagej.ImageJConverters.copyArrayJToImagePlus(ImageJConverters.java:38)
    at net.clesperanto.CLIJ3.convert(CLIJ3.java:77)
    at net.clesperanto.CLIJ3.pull(CLIJ3.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.NoSuchMethodError: java.lang.NoSuchMethodError: net.imglib2.util.Util.safeInt(J)I

    at org.python.core.Py.JavaError(Py.java:547)
    at org.python.core.Py.JavaError(Py.java:538)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:192)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:208)
    at org.python.core.PyObject.__call__(PyObject.java:477)
    at org.python.core.PyObject.__call__(PyObject.java:481)
    at org.python.core.PyMethod.__call__(PyMethod.java:141)
    at org.python.pycode._pyx1.f$0(/data/clesperanto/clij3/demo/basic_demo.py:15)
    at org.python.pycode._pyx1.call_function(/data/clesperanto/clij3/demo/basic_demo.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:173)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.Py.runCode(Py.java:1687)
    at org.python.core.__builtin__.eval(__builtin__.java:497)
    at org.python.core.__builtin__.eval(__builtin__.java:501)
    at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:255)
    at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:57)
    at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
    at org.scijava.script.ScriptModule.run(ScriptModule.java:173)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
    at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.NoSuchMethodError: net.imglib2.util.Util.safeInt(J)I
    at net.clesperanto.imagej.ImageJConverters.copyArrayJToImagePlus(ImageJConverters.java:38)
    at net.clesperanto.CLIJ3.convert(CLIJ3.java:77)
    at net.clesperanto.CLIJ3.pull(CLIJ3.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)
    ... 24 more

I also get the following warning in the consols:

Warning: Loader.putMemberOffset(): java.lang.ClassNotFoundException: org.bytedeco.javacpp.Loader$Helper
Warning: Loader.putMemberOffset(): java.lang.ClassNotFoundException: org.bytedeco.javacpp.Loader$Helper
StRigaud commented 2 weeks ago

adding javacpp jar to the update site fix the warnings but I still have the error:

Started New_.py at Thu Oct 17 11:43:05 CEST 2024
Traceback (most recent call last):
  File "New_.py", line 13, in <module>
    at net.clesperanto.imagej.ImageJConverters.copyArrayJToImagePlus(ImageJConverters.java:38)
    at net.clesperanto.CLIJ3.convert(CLIJ3.java:75)
    at net.clesperanto.CLIJ3.pull(CLIJ3.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.NoSuchMethodError: java.lang.NoSuchMethodError: net.imglib2.util.Util.safeInt(J)I

    at org.python.core.Py.JavaError(Py.java:547)
    at org.python.core.Py.JavaError(Py.java:538)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:192)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:208)
    at org.python.core.PyObject.__call__(PyObject.java:477)
    at org.python.core.PyObject.__call__(PyObject.java:481)
    at org.python.core.PyMethod.__call__(PyMethod.java:141)
    at org.python.pycode._pyx0.f$0(New_.py:14)
    at org.python.pycode._pyx0.call_function(New_.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:173)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.Py.runCode(Py.java:1687)
    at org.python.core.__builtin__.eval(__builtin__.java:497)
    at org.python.core.__builtin__.eval(__builtin__.java:501)
    at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:255)
    at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:57)
    at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
    at org.scijava.script.ScriptModule.run(ScriptModule.java:173)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
    at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.NoSuchMethodError: net.imglib2.util.Util.safeInt(J)I
    at net.clesperanto.imagej.ImageJConverters.copyArrayJToImagePlus(ImageJConverters.java:38)
    at net.clesperanto.CLIJ3.convert(CLIJ3.java:75)
    at net.clesperanto.CLIJ3.pull(CLIJ3.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)
    ... 24 more
tinevez commented 2 weeks ago

After investigation:

tinevez commented 2 weeks ago

Confirmed: when we upload the right version of imglib2, the script works.