NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 1237 - Launching jython interpreter causes java exception
Launching jython interpreter causes java exception
Status: CONFIRMED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Windows
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2016-03-02 10:02 CST by Matt Wayland
Modified: 2016-04-26 17:25 CDT
4 users (show)

See Also:

Description Matt Wayland 2016-03-02 10:02:15 CST
Opening the jython interpreter from the Plugins>Scripting menu causes the following java exception:

(Fiji Is Just) ImageJ 2.0.0-rc-44/1.50e; Java 1.8.0_66 [64-bit]; Windows 7 6.1; 44MB of 6075MB (<1%)
 
Traceback (most recent call last):
  File "<string>", line 8, in <module>
java.lang.NoClassDefFoundError: javax/media/j3d/Canvas3D

	at java.lang.Class.forName0(Native Method)

	at java.lang.Class.forName(Class.java:348)

	at org.python.core.Py.loadAndInitClass(Py.java:909)

	at org.python.core.Py.findClassInternal(Py.java:822)

	at org.python.core.Py.findClassEx(Py.java:895)

	at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:133)

	at org.python.core.packagecache.PackageManager.findClass(PackageManager.java:28)

	at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:122)

	at org.python.core.PyJavaPackage.__findattr_ex__(PyJavaPackage.java:137)

	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._pyx0.f$0(<string>:43)

	at org.python.pycode._pyx0.call_function(<string>)

	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.python.core.Py.exec(Py.java:1319)

	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:206)

	at Jython.Jython_Interpreter.eval(Jython_Interpreter.java:102)

	at common.AbstractInterpreter.importAll(AbstractInterpreter.java:962)

	at Jython.Jython_Interpreter.run(Jython_Interpreter.java:73)

	at ij.IJ.runUserPlugIn(IJ.java:212)

	at ij.IJ.runPlugIn(IJ.java:176)

	at ij.Executer.runCommand(Executer.java:136)

	at ij.Executer.run(Executer.java:65)

	at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.ClassNotFoundException: javax.media.j3d.Canvas3D

	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)

	... 27 more


java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: javax/media/j3d/Canvas3D

	at org.python.core.Py.JavaError(Py.java:495)
	at org.python.core.Py.findClassEx(Py.java:901)
	at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:133)
	at org.python.core.packagecache.PackageManager.findClass(PackageManager.java:28)
	at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:122)
	at org.python.core.PyJavaPackage.__findattr_ex__(PyJavaPackage.java:137)
	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._pyx0.f$0(<string>:43)
	at org.python.pycode._pyx0.call_function(<string>)
	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.python.core.Py.exec(Py.java:1319)
	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:206)
	at Jython.Jython_Interpreter.eval(Jython_Interpreter.java:102)
	at common.AbstractInterpreter.importAll(AbstractInterpreter.java:962)
	at Jython.Jython_Interpreter.run(Jython_Interpreter.java:73)
	at ij.IJ.runUserPlugIn(IJ.java:212)
	at ij.IJ.runPlugIn(IJ.java:176)
	at ij.Executer.runCommand(Executer.java:136)
	at ij.Executer.run(Executer.java:65)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: javax/media/j3d/Canvas3D
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at org.python.core.Py.loadAndInitClass(Py.java:909)
	at org.python.core.Py.findClassInternal(Py.java:822)
	at org.python.core.Py.findClassEx(Py.java:895)
	... 22 more
Caused by: java.lang.ClassNotFoundException: javax.media.j3d.Canvas3D
	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)
	... 27 more

Information about your version of Java:

  os.arch => amd64
  os.name => Windows 7
  os.version => 6.1
  java.version => 1.8.0_66
  java.vendor => Oracle Corporation
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.8.0_66-b18
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 25.66-b18
  java.vm.vendor => Oracle Corporation
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.8
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\Fiji.app/java/win64/jdk1.8.0_66//jre
  imagej.dir => C:\Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20160121055533)
Fiji: http://update.fiji.sc/ (last check:20160114142236)
Java-8: http://sites.imagej.net/Java-8/ (last check:20160121051645)
Comment 1 Mark Hiner 2016-03-02 10:49:10 CST
I assume one of the classes in the default imports is reaching a Java3D class:
https://github.com/fiji/fiji-scripting/blob/378a59ab9115f5d5f54f3abb68eac91d228839c5/src/main/java/common/AbstractInterpreter.java#L970-L971

In Java 8 we are moving from Java3D to JOGL. Everything on the Java 8 update site is supposed to have updated their dependencies as appropriate.

For more info see: http://imagej.net/2015-12-22_-_The_road_to_Java_8

Any thoughts Curtis?
Comment 2 Jan Eglinger 2016-03-02 10:58:37 CST
(In reply to Mark Hiner from comment #1)
> I assume one of the classes in the default imports is reaching a Java3D
> class:

That's most likely:
"ini.trakem2.Project"

which would be fixed by releasing TrakEM2-1.0h and uploading it to the Java-8 update site.

See this discussion on gitter.im:
https://gitter.im/fiji/fiji/archives/2016/02/29

and the corresponding TrakEM issue:
https://github.com/trakem2/TrakEM2/issues/13
Comment 3 Curtis Rueden 2016-04-26 17:25:06 CDT
FWIW, I pinged Stephan about releasing a new TrakEM2 to fix this:
https://gitter.im/fiji/fiji/archives/2016/04/26