斐济(ImageJ)无法运行任何脚本:java.lang.NoClassDefFoundError

时间:2016-04-19 13:19:38

标签: python imagej

我正在尝试在斐济运行一些python脚本,但它似乎无法运行简单的代码,例如:print("something")。它总是抛出这个java.lang.NoClassDefFoundError,更奇怪的是错误总是指向某个随机行(即使该行不包含任何内容,每次我开始斐济时它总是选择一个随机数并继续指向该行)。

我在我的机器上运行:Ubuntu 15.10 64 bit,我的Java和斐济都是最新的。

以下是详细的错误脚本:

Started gamepad_socket.py at Tue Apr 19 15:03:16 CEST 2016
[WARNING] Auto-imports are active, but deprecated.
Traceback (most recent call last):
  File "/home/peterpark/cti/Tutorials/gamepad_socket.py", line 33, in <module>

java.lang.NoClassDefFoundError: javax/vecmath/Point3f
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetPublicMethods(Class.java:2902)
    at java.lang.Class.getMethods(Class.java:1615)
    at org.python.core.PyJavaType.init(PyJavaType.java:273)
    at org.python.core.PyType.createType(PyType.java:1264)
    at org.python.core.PyType.addFromClass(PyType.java:1201)
    at org.python.core.PyType.fromClass(PyType.java:1291)
    at org.python.core.adapter.ClassicPyObjectAdapter$6.adapt(ClassicPyObjectAdapter.java:76)
    at org.python.core.adapter.ExtensiblePyObjectAdapter.adapt(ExtensiblePyObjectAdapter.java:44)
    at org.python.core.adapter.ClassicPyObjectAdapter.adapt(ClassicPyObjectAdapter.java:120)
    at org.python.core.Py.java2py(Py.java:1563)
    at org.python.core.PyJavaPackage.addClass(PyJavaPackage.java:89)
    at org.python.core.PyJavaPackage.__findattr_ex__(PyJavaPackage.java:138)
    at org.python.core.PyObject.__findattr__(PyObject.java:863)
    at org.python.core.imp.importFromAs(imp.java:1015)
    at org.python.core.imp.importFrom(imp.java:987)
    at org.python.pycode._pyx1.f$0(/home/peterpark/cti/Tutorials/gamepad_socket.py:124)
    at org.python.pycode._pyx1.call_function(/home/peterpark/cti/Tutorials/gamepad_socket.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:1275)
    at org.scijava.plugins.scripting.jython.JythonScriptEngine.eval(JythonScriptEngine.java:76)
    at org.scijava.script.ScriptModule.run(ScriptModule.java:174)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
    at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: javax.vecmath.Point3f
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 32 more

提前感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

这似乎是脚本编辑器不推荐使用的自动导入功能中的bug

通过编辑&gt;尝试禁用自动导入在脚本编辑器的菜单中自动导入(不建议使用)