JMol fatal problem - supposedly version incompatibility

30 views
Skip to first unread message

ManDay

unread,
Jun 16, 2010, 8:39:04 AM6/16/10
to sage-notebook
Hello everyone, let me do this quickly - if you require further
information I'd gladly provide it anytime.

With the latest Sage binaries for Ubuntu 10.4LTS any JMol applet in
Notebook is a black box. Fact is, that JMol loads but fails at
receiving data from the Sage-NB backend.

I've taken a brief look into the process which is meant to be executed
and here is what I found out:

The JMol applet requests a file from the (local) server on :8080 in
which it expects data or further instructions. Judging from the JAVA
(Sun) console this succeeds, the file queried is for example

http://localhost:8000/home/admin/0/cells/1/sage0-size500.jmol?1276349004

and contains two lines, namely

set defaultdirectory "sage0-size500-306189399.jmol.zip"
script SCRIPT

Without further investigation I'd say that this look's all right. Yet,
the applet complains in the JAVA console that...

FileManager opening http://localhost:8000/home/admin/0/cells/1/sage0-size500.jmol?1276349004
script compiler ERROR: command expected
----line 1 command 1 of /home/admin/0/cells/1/sage0-size500.jmol?
1276349004:
>>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<<<<

...and so forth. Since the line mentioned is not even in the file
received from the server I wonder how this can be. I'd greatly
appreciate it if someone who is familar with JMol could take a look
into this. Possibly see you in #sage-devel on freenode.

Thank you.

Jonathan

unread,
Jun 16, 2010, 9:10:13 PM6/16/10
to sage-notebook
Which Java are you using? The ICETEA package is not complete and is
incompatible with Jmol. It seems to work fine for me using the Sun/
Oracle Java.

We're in the process of testing a newer version of the Jmol interface
which uses the latest version of Jmol (the standard in SAGE is more
than a year old). See this discussion for instructions on trying
out. We'd love feedback.

http://groups.google.com/group/sage-devel/browse_thread/thread/aa4ab5c7c1ceb53c

(see the second message for the easiest install method)

You might also want to look at the trac ticket to see the issues that
have been found already.

http://trac.sagemath.org/sage_trac/ticket/9238

Thanks for the feedback.
Jonathan



On Jun 16, 7:39 am, ManDay <Man...@gmx.net> wrote:
> Hello everyone, let me do this quickly - if you require further
> information I'd gladly provide it anytime.
>
> With the latest Sage binaries for Ubuntu 10.4LTS any JMol applet in
> Notebook is a black box. Fact is, that JMol loads but fails at
> receiving data from the Sage-NB backend.
>
> I've taken a brief look into the process which is meant to be executed
> and here is what I found out:
>
> The JMol applet requests a file from the (local) server on :8080 in
> which it expects data or further instructions. Judging from the JAVA
> (Sun) console this succeeds, the file queried is for example
>
> http://localhost:8000/home/admin/0/cells/1/sage0-size500.jmol?1276349004
>
> and contains two lines, namely
>
> set defaultdirectory "sage0-size500-306189399.jmol.zip"
> script SCRIPT
>
> Without further investigation I'd say that this look's all right. Yet,
> the applet complains in the JAVA console that...
>
> FileManager openinghttp://localhost:8000/home/admin/0/cells/1/sage0-size500.jmol?1276349004

Cedric

unread,
Jun 17, 2010, 1:29:13 AM6/17/10
to sage-notebook
Hello Jonathan,

I've already tried the newest version of JMol from that thread and
sadly the only feedback I can give you is that it didn't help. The
Problem is the same, same errors.

I'using Sun's Java (and the according Plugin for FF), too (but have
tried icedtea before), but there is no difference between the two as
far as concerns my problem.

I think the core issue really is that JMol sees a different file than
me (or at least complains about lines which are not in the file I
see).

On Jun 17, 3:10 am, Jonathan <gu...@uwosh.edu> wrote:
> Which Java are you using?  The ICETEA package is not complete and is
> incompatible with Jmol.   It seems to work fine for me using the Sun/
> Oracle Java.
>
> We're in the process of testing a newer version of the Jmol interface
> which uses the latest version of Jmol (the standard in SAGE is more
> than a year old).  See this discussion for instructions on trying
> out.  We'd love feedback.
>
> http://groups.google.com/group/sage-devel/browse_thread/thread/aa4ab5...

Cedric

unread,
Jun 17, 2010, 6:37:24 AM6/17/10
to sage-notebook
The interesting thing, which I shouöld have tried out earlier but just
recently thought of is runningJMol from http://t2nb.math.washington.edu:8000/
where it doesn't work either

Which makes this a client-side problem...

Therefore any advices you could give will still be greatly appreciated
but I have to acknowledge that it no longer is a purely sage related
issue.

Jonathan

unread,
Jun 17, 2010, 11:40:05 AM6/17/10
to sage-notebook
Try a few pages with Jmol in them that are not inside Sage. Set your
java preferences so that the java console is open and post the error
messages here. I may be able to diagnose the problem that way.

Try for example the following page:
http://www.uwosh.edu/faculty_staff/gutow/Orbitals/N/ethylene_VB.shtml

If this works then there is something special about Sage.

Note: I have had trouble with FF on a Mac and Jmol in Sage. I
recommend Safari when using a Mac. FF is a little strange about how
it passes file paths. That said, FF works fine for me on Linux when
using Sage. I avoid Windows so don't know for sure about that, but my
students have never reported a problem.

Jonathan
On Jun 17, 5:37 am, Cedric <Man...@gmx.net> wrote:
> The interesting thing, which I shouöld have tried out earlier but just
> recently thought of is runningJMol fromhttp://t2nb.math.washington.edu:8000/

Cedric

unread,
Jun 17, 2010, 2:32:40 PM6/17/10
to sage-notebook
Hello again,

firstly, I'd like to thank you for taking the time to look into this.

I thought I had replied already but I must have pressed the wrong
button, so here is what I found out:

JMol Applets on the JMol.sourceforge page work perfectly fine. Same
holds true for the page you just suggested. What is different about
them is that they pass data for the "plot" differently - instead of
first providing a file which then in turn points to the data, the data
is downloaded directly. I wonder why Sage doesn't do it that way too
but rather first requests a file which holds further information (that
specific file is it which causes the problem as described above so I
assume the simlest fix would be to make the process the same as on the
JMOL page).

Then, JMol applets on online NB such as http://t2nb.math.washington.edu
work equally not. Which is a unmistakable indication for this being a
client-side problem with Java and JS.

I can report another thing, though: For an instant I had JMol working!
I've no idea how this happend but I clearly remember to have seen and
clicked arround a 3d plot. Actually I even played arround with it for
a while until I noticed what I was doing. But then, after I came back
some hours later, there is nothing left but vague memories of that -
it's not working as before.

I've no idea why it worked for a time but now is back to status quo.
At the same time I installed openoffice-common because I thought it
could help with some JAVA but on the other hand since it ceased to
work again, I doubt that there is any connection.
Message has been deleted
Message has been deleted

Cedric

unread,
Jun 17, 2010, 3:02:11 PM6/17/10
to sage-notebook
I'm struggling a littel with submitting and removing messages here, if
you have by now received a couple of emails please just ignore them
and look at http://groups.google.com/group/sage-notebook/browse_thread/thread/9191e031224a3ce9

What I actually want to say is that I managed to make out a pattern
that is

Jmol doesnt work for SAGE

BUT Jmol works in the published worksheet!

I hope this kind of rings the bell and you can cleary determine what
is the decisive difference between a published worksheet and the
editable worksheet. I don't know what it could be.

Jonathan

unread,
Jun 17, 2010, 6:32:54 PM6/17/10
to sage-notebook
Cedric,

This is really odd! I have seen this behavior with MacOS and FF, but
not Linux. See if it works properly using a different browser. Some
options in addition to FF are:

SeaMonkey (mozilla engine, should behave like FF)

Chromium (Webkit engine similar to Safari)

I have run them on 32 bit Ubuntu 10.04 and they work with Sage +
Jmol. The only thing I can think of is that something in your set up
is Caching the wrong file, which then says to access a file that no
longer exists. If these other browsers work, try completely clearing
out the java cache and the FF browser cache.

On Jun 17, 2:02 pm, Cedric <Man...@gmx.net> wrote:
> I'm struggling a littel with submitting and removing messages here, if
> you have by now received a couple of emails please just ignore them
> and look athttp://groups.google.com/group/sage-notebook/browse_thread/thread/919...

Cedric

unread,
Jun 18, 2010, 2:20:22 AM6/18/10
to sage-notebook
I cleared whatever caches I could clear but the problem remains. Using
another browser (even if its just for SAGE) is the last thing I want,
but if I don't find any solution I will have indeed to do that. Thanks
- if anything else comes to your mind, please let me know.

Cedric

unread,
Jun 18, 2010, 1:08:24 PM6/18/10
to sage-notebook
I managed to make some further investigation and can now pretty much
pin it down. I analyzed traffic upon requesting the specific file from
the server and here is what I got:

GET /home/ManDay/1/cells/1/sage0-size500.jmol?1276880711 HTTP/1.1

User-Agent: Mozilla/4.0 (Linux 2.6.32-22-generic) Java/1.6.0_20

Host: t2nb.math.washington.edu:8000

Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2

Connection: keep-alive



HTTP/1.1 301 Moved Permanently

Date: Fri, 18 Jun 2010 17:05:16 GMT

Content-Length: 201

Content-Type: text/html

Location: http://t2nb.math.washington.edu:8000/home/ManDay/1/cells/1/sage0-size500.jmol/

Server: Twisted/9.0.0 TwistedWeb/[twisted.web2, version 8.1.0]



<html><head><title>Moved Permanently</title></head><body><h1>Moved
Permanently</h1><p>Document moved to
http://t2nb.math.washington.edu:8000/home/ManDay/1/cells/1/sage0-size500.jmol/.</p></body></html>

Cedric

unread,
Jun 18, 2010, 1:21:59 PM6/18/10
to sage-notebook
Stating the rather obvious now: The problem turns out to be SAGE
indeed which issues a 301 which JAVA - as opposed to my FF - is not
accounting for - that's why I see a different file than JMOL.

One could argue that JAVA should properly accoutn for the 301 but then
why sould SAGE issue it in the first place or JMol natively request
the wrong path. I still can't explain why other browsers such as
chrome do not have a problem with that - it must be the according
plugin - but I can now tell that this can be fixed in SAGE, gladly.

Any comments? Can anyone take on this - I'm by far not eligible. Thanks

Jonathan

unread,
Jun 18, 2010, 2:35:02 PM6/18/10
to sage-notebook
The 301 from the server may or may not be your problem. Remember I do
not reproduce the problem using Ubuntu and FF. FF + Ubuntu works fine
for me.

That said, I would report the following into the bug tracking system:

1) Cannot view jmol 3-D using FF (versionXX) + Ubuntu (exact version
64 bit) + Sun Java (version) when the notebook is a private notebook.

2) Can view jmol 3-D of the same notebook using the same FF + OS if it
is published.

3) Link to this discussion.

(you might note that this has also been seen for FF + MacOS)

Cedric

unread,
Jun 18, 2010, 3:27:12 PM6/18/10
to sage-notebook
I object that the 301 could be a client side problem - that's what the
server replies, whether JAVA asks it, I do it through firefox or even
telnet alike. Eventually, it is a problem on both sides and I admit
it's far from SAGEs fault that this doesnt work but I'm sure you guys
are quicker at fixing this than the slow machinery at mozilla or even
OpenJDK is :P

I'll file the bug as you recommented. Thanks!

Jonathan

unread,
Jun 18, 2010, 6:53:06 PM6/18/10
to sage-notebook
Cedric,

I have no idea if this is a client side or server problem. The issue
is reproducibility. It is going to be very difficult to track down.
Except for the fact that I am running 32 bit Ubuntu and you, I
believe, are running64 bit Ubuntu there does not appear to be a
difference between our systems. There must be, as I don't see the
problem on my system.

I have one more idea. Save the offending worksheet as a .sws file and
post it somewhere that we can move it to another server and try it in
a different account.

Please also understand that I am primarily a chemistry professor. I
have been trying to help with the integration of Jmol and Sage as I
use both for my work and have contributed significantly to Jmol. I
know almost nothing about how the twisted server used in the Sage
notebook works. My expertise in this case is javascript interaction
with Jmol.

So my main interest here is to try to find a reproducible failure to
report to the people who know more about the twisted server.


Jonathan
Reply all
Reply to author
Forward
0 new messages