#16647: java3d doesn't work.
------------------------+----------------------------
   Reporter:  gagern    |            Owner:
       Type:  defect    |           Status:  new
   Priority:  major     |        Milestone:  sage-6.3
  Component:  graphics  |         Keywords:
  Merged in:            |          Authors:
  Reviewers:            |  Report Upstream:  N/A
Work issues:            |           Branch:
     Commit:            |     Dependencies:
   Stopgaps:            |
------------------------+----------------------------
 Even after running `./sage -i java3d`, the java3d viewer will fail to
 load:

 {{{
 sage: D=dodecahedron()
 sage: D.show(viewer="java3d", verbosity=True)
 Exception in thread "main" java.lang.NoClassDefFoundError:
 javax/media/j3d/Canvas3D
         at
 org.sagemath.sage3d.ObjectViewerApplet.showView(ObjectViewerApplet.java:49)
         at
 org.sagemath.sage3d.ObjectViewerApplet.showView(ObjectViewerApplet.java:40)
         at
 org.sagemath.sage3d.ObjectViewerApp.main(ObjectViewerApp.java:28)
 Caused by: java.lang.ClassNotFoundException: javax.media.j3d.Canvas3D
         at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
         ... 3 more
 }}}

 Adding a `set -x` to the `sage3d` script I see it executing these
 commands:

 {{{
 ++ …/sage/local/bin/sage-pypkg-location sagenb
 + SAGE3D_HOME=…/sage/local/lib/python2.7/site-
 packages/sagenb-0.10.8.2-py2.7.egg/sagenb/data/sage3d
 + cd …/sage/local/lib/python2.7/site-
 packages/sagenb-0.10.8.2-py2.7.egg/sagenb/data/sage3d
 + export LD_LIBRARY_PATH=…/sage/local/lib/python2.7/site-
 packages/sagenb-0.10.8.2-py2.7.egg/sagenb/data/sage3d/lib/amd64
 + LD_LIBRARY_PATH=…/sage/local/lib/python2.7/site-
 packages/sagenb-0.10.8.2-py2.7.egg/sagenb/data/sage3d/lib/amd64
 + java -classpath
 lib/sage3d.jar:lib/ext/j3dcore.jar:lib/ext/vecmath.jar:lib/ext/j3dutils.jar
 org.sagemath.sage3d.ObjectViewerApp …/tmp_ctQ56m.obj
 }}}

 That `…/sage3d/lib/amd64` directory mentioned in `LD_LIBRARY_PATH` does
 not exist. Its parent, the `lib` directory, contains `sage3d.jar` as its
 sole content. Most things mentioned on the classpath don't exist either.
 instead, `sage/local/java/sun-libs/` contains several jars related to
 Java3D.

 I also wonder about the version of the spkg, which is given as 20070901. I
 think there are newer versions around, although they are a bit hard to
 find. Referencs I found:

 * http://forum.jogamp.org/java3d-f3728156.html
 * http://gouessej.wordpress.com/2012/08/01/java-3d-est-de-retour-java-3d-
 is-back/
 * http://jogamp.org/deployment/java3d/

 I would suggest packaging Java3D 1.6.0-pre10 as a spkg and trying to get
 it to work. Or dump support for Java3D altogether.

--
Ticket URL: <http://trac.sagemath.org/ticket/16647>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to