Has anyone gotten the LiveGraphics3d applet to work with a Java 7 client on WeBWorK 2.9? This used to work on 2.7 but now we receive the error ClassNotFoundException, Live.class. I've used Fiddler to inspect the traffic and this results in the applet actually loading under a Java 7 client. Any suggestions to get this working?
Not a response to your question, but related: Java applets have become a real pain. With both OS security settings and browser settings to consider, getting these to work for all students has become quite time-consuming. Which is too bad, since I especially like some of the multi-variable calculus problems that use the LiveGraphics3d applet.
Is there a Java-free alternative implementation available?
I have signed a version of the live.jar file which I've shared with Martin Kraus, the developer, and which has helped make these problems continue to work well for me and my students.
They still don't load on a tablet, but they work with much less hassle on laptops and desktops. You are just asked to trust the certificate when the jar file loads.
See the attached signed version of the live.jar file.
I forget exactly where it is located in the webwork file structure, but could find out if you need me to.
Paul
Hi Paul, thanks for the reply. I replaced my live.jar file from /opt/webwork/webwork2/htdocs/applets/liveJar/ and I still continue to get the same error. I also deleted the java cache of my client and the problem still persists.
Hi, Tim!
I'm very sorry to hear you are still having trouble with this. As I said, it is currently working on my server for me and my students in a multivariable calculus course I am teaching.
As you said, the file should be placed in: /opt/webwork/webwork2/htdocs/applets/liveJar/
There should be two additional files in this folder: liveJar.html and
test.m
The error you mentioned makes it sound like the problem is not able to locate the live.jar file at all. Perhaps one of the other files listed above is missing or has been changed, or perhaps some other setting is different.
Were you presented with a signature/certificate dialog for LiveGraphics3D by Martin Kraus listing me as the publisher to click on to run the applet? If not, then the file was not located from the problem. There is something in WeBWorK that needs to be adjusted.
If not, are you running this applet online or offline? Current browsers often require you to change settings in order to load applets locally (rather than over the internet from a website).
If you were able to click run on the signature dialog and you are running it online, and the error is still being given, then something else is happening. Perhaps you can send me a WeBWorK problem for which this error is being given and I can double-check that it works fine on my WeBWorK server.
If you get this resolve, please let me know.
Paul
One more thing to try:
Be sure to restart your computer and/or restart the browser, and clear the cache for jar files in your Java Dialog found on your computer's control panel (Windows). I have found jar files sometimes persist longer than you'd think possible in a browser. Another way to clear this cache when in the browser is to type Ctrl-x in the Java Console (if you have this opening up when the applet runs) and then click on the reload page button. I do this because I develop applets in Java.
Paul
I cleared the Java cached both ways and restarted my computer. The same error is displayed. I am also not getting asked about the signed live.jar.
Hi Paul,
The liveJar.html and test.m are both present in /opt/webwork/webwork2/htdocs/applets/liveJar/. I never saw a signature/certificate dialog when trying to view the applet. I'm unsure of whether I'm running the applet online or offline, how would I check this?
How would I go about sending you the WeBWorK problem?
Thanks for your help,
Tim
The liveJar.html and test.m are both present in /opt/webwork/webwork2/htdocs/applets/liveJar/. I never saw a signature/certificate dialog when trying to view the applet. I'm unsure of whether I'm running the applet online or offline, how would I check this?
How would I go about sending you the WeBWorK problem?
Thanks for your help,
Tim
Have you checked to be sure java is working on your browser?
Here's a link to my CalcPlot3D applet that should work fine and show you the certificate to ask you if it's okay to run.
http://web.monroecc.edu/manila/webfiles/calcNSF/JavaCode/CalcPlot3D.htm
Let me know what happens.
To send me a problem, you can copy and paste the code from the problem editor or just send me the address.
Paul
Here's a link to my CalcPlot3D applet that should work fine and show you the certificate to ask you if it's okay to run.
http://web.monroecc.edu/manila/webfiles/calcNSF/JavaCode/CalcPlot3D.htm
Let me know what happens.
To send me a problem, you can copy and paste the code from the problem editor or just send me the address.
Paul
The CalcPlot3D applet does work in my browser.
Here is the test problem:
## DESCRIPTION
## Identify Level Curves
## ENDDESCRIPTION
## Tagged by nhamblet
## DBsubject(Calculus - multivariable)
## DBchapter(Concepts for multivariable functions)
## DBsection(Traces, contours, and level sets)
## Date(8/23/07)
## Institution(Union College)
## Level(2)
## KEYWORDS('Graph', 'Multivariable', 'Level Curve')
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PGstandard.pl",
"PGunion.pl",
"MathObjects.pl",
"contextABCD.pl",
"imageChoice.pl",
"LiveGraphics3D.pl",
"PGcourse.pl",
);
TEXT(beginproblem);
##############################################
# Setup
Context("ABCD")->strings->add(E=>{}, F=>{});
$size = [150,150]; # the size of the images
$tsize = 300; # tex size of images
$lsize = [200,200]; # the size of the Live3D images
$tlsize = 400; # tex size of Live3D images
#
# Setup up a LiveGraphics3D file and image
#
sub Graph {
my $n = shift;
#
# The .zip file must be renamed .html so that alias() will know how to
# handle it properly.
#
my $mfile = alias("graph$n-zip.html");
my $gfile = alias("graph${n}s.gif");
my $live3d = Live3Dfile("graph$n.m",
image => $gfile,
archive => $mfile,
size => $lsize, tex_size => $tlsize,
scale => 1.4);
return ($live3d,"graph$n.gif");
}
#
# The Live3D files and their associated GIFs
#
@QA = (
Graph(1), Graph(2), Graph(3), Graph(4),
Graph(5), Graph(6), Graph(7), Graph(8),
);
##############################################
#
# use an image match list
#
$ml = new_image_match_list(
link => 0, # don't link to separate image
size => $size, # image size in pixels
tex_size => $tsize, # tex size in percent times 10
border => 0, # image already includes border
columns => 2, # number of columns
);
$ml->qa(@QA); # set the questions and answers
$ml->choose(4); # select 4 of them
$ml->choose_extra(2); # and show the other 2
##############################################
#
# Make a table of the Live3D images and answer rules
#
sub my_print_q {
my $self = shift; my (@L3D) = @_;
local $length = $self->{ans_rule_len};
BeginTable().
AlignedRow([@L3D[0,1]]).
TableSpace(5,0).
AlignedRow([Answer(1),Answer(2)]).
TableSpace(25,6).
AlignedRow([@L3D[2,3]]).
TableSpace(5,0).
AlignedRow([Answer(3),Answer(4)]).
EndTable();
}
sub Answer {$BBOLD.$_[0].". ".$EBOLD.ans_rule($length)}
$ml->{rf_print_q} = ~~&my_print_q;
##############################################
# Main text
BEGIN_TEXT
For each surface shown on the left, select the image on the right
that represents the level sets for that surface.
Drag a surface in order to rotate it. In the level sets, the red
areas are the lowest levels while the purple are the highest.
$PAR
\{ColumnMatchTable($ml)\}
$PAR
END_TEXT
##################################################
# Answers
ANS(string_cmp($ml->ra_correct_ans));
$showPartialCorrectAnswers = 0;
install_problem_grader(~~&std_problem_grader);
##################################################
ENDDOCUMENT(); # This should be the last executable line in the problem.
Here is the test problem:
## DESCRIPTION
## Identify Level Curves
## ENDDESCRIPTION
## Tagged by nhamblet
## DBsubject(Calculus - multivariable)
## DBchapter(Concepts for multivariable functions)
## DBsection(Traces, contours, and level sets)
## Date(8/23/07)
## Institution(Union College)
## Level(2)
## KEYWORDS('Graph', 'Multivariable', 'Level Curve')
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PGstandard.pl",
"PGunion.pl",
"MathObjects.pl",
"contextABCD.pl",
"imageChoice.pl",
"LiveGraphics3D.pl",
"PGcourse.pl",
);
TEXT(beginproblem);
##############################################
# Setup
Context("ABCD")->strings->add(E=>{}, F=>{});
$size = [150,150]; # the size of the images
$tsize = 300; # tex size of images
$lsize = [200,200]; # the size of the Live3D images
$tlsize = 400; # tex size of Live3D images
#
# Setup up a LiveGraphics3D file and image
#
sub Graph {
my $n = shift;
#
# The .zip file must be renamed .html so that alias() will know how to
# handle it properly.
#
my $mfile = alias("graph$n-zip.html");
my $gfile = alias("graph${n}s.gif");
my $live3d = Live3Dfile("graph$n.m",
image => $gfile,
archive => $mfile,
size => $lsize, tex_size => $tlsize,
scale => 1.4);
return ($live3d,"graph$n.gif");
}
#
# The Live3D files and their associated GIFs
#
@QA = (
Graph(1), Graph(2), Graph(3), Graph(4),
Graph(5), Graph(6), Graph(7), Graph(8),
);
##############################################
#
# use an image match list
#
$ml = new_image_match_list(
link => 0, # don't link to separate image
size => $size, # image size in pixels
tex_size => $tsize, # tex size in percent times 10
border => 0, # image already includes border
columns => 2, # number of columns
);
$ml->qa(@QA); # set the questions and answers
$ml->choose(4); # select 4 of them
$ml->choose_extra(2); # and show the other 2
##############################################
#
# Make a table of the Live3D images and answer rules
#
sub my_print_q {
my $self = shift; my (@L3D) = @_;
local $length = $self->{ans_rule_len};
BeginTable().
AlignedRow([@L3D[0,1]]).
TableSpace(5,0).
AlignedRow([Answer(1),Answer(2)]).
TableSpace(25,6).
AlignedRow([@L3D[2,3]]).
TableSpace(5,0).
AlignedRow([Answer(3),Answer(4)]).
EndTable();
}
sub Answer {$BBOLD.$_[0].". ".$EBOLD.ans_rule($length)}
$ml->{rf_print_q} = ~~&my_print_q;
##############################################
# Main text
BEGIN_TEXT
For each surface shown on the left, select the image on the right
that represents the level sets for that surface.
Drag a surface in order to rotate it. In the level sets, the red
areas are the lowest levels while the purple are the highest.
$PAR
\{ColumnMatchTable($ml)\}
$PAR
END_TEXT
##################################################
# Answers
ANS(string_cmp($ml->ra_correct_ans));
$showPartialCorrectAnswers = 0;
install_problem_grader(~~&std_problem_grader);
##################################################
ENDDOCUMENT(); # This should be the last executable line in the problem.
Hi, Tim!
I realized this problem you sent me is the following problem from the Open Problem Library:
Library/Union/setMVlevelsets/levels-3/levels-3.pg
It seems to work fine on my WeBWorK server when run from my Windows 7 computer in Chrome. I even copied all the graphics and text files into a folder with your version of the problem and it still functions fine.
If you make a copy of the problem to edit it, you also need to find the graphics files, etc. that are being loaded by the problem. For that I had to use my copy of the Open Problem Library I have downloaded from github.
But if you are using the problem at the address I stated above this should not be a problem.
There is an issue I am aware of with these newly signed Java applets when trying to run them on older OS versions on the Mac, like Snow Leopard. Since it is signed to run from the sandbox instead of having full permissions, it caused some sort of confusion for the old version of Java that is on my old machine since no signed applets ever used to request to run in the sandbox. They were being signed to be granted permissions. But now all applets are required to be signed in order to be allowed to run.
My CalcPlot3D does not have this problem since it is signed for full permissions. I wonder if it would help if I sent you a version of live.jar signed in this way.
Perhaps we should continue this discussion via email until we discover a solution.
Paul
Hi Paul,
I have some good news on this. I increased the verbosity of the Java Console and discovered this error:
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
I found the solution in this article by creating a ServerAlias in our ssl.conf:
https://stackoverflow.com/questions/7615645/ssl-handshake-alert-unrecognized-name-error-since-upgrade-to-java-1-7-0/8058839#8058839
The signed live.jar you gave me is now working!
Thanks for all of you help.
Tim
I have some good news on this. I increased the verbosity of the Java Console and discovered this error:
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
I found the solution in this article by creating a ServerAlias in our ssl.conf:
https://stackoverflow.com/questions/7615645/ssl-handshake-alert-unrecognized-name-error-since-upgrade-to-java-1-7-0/8058839#8058839
The signed live.jar you gave me is now working!
Thanks for all of you help.
Tim
That's great to hear, Tim!
I am curious whether your WeBWorK operates as a secure website with https. I wonder if this could be connected to the issue.
I'm so glad you've got it working though!
Paul
We are running our site under https. The old server was an Apple Xserve that was running ww 2.7 and pg 2.8. We then migrated over to Red Hat with ww 2.9 and pg 2.9. I think changes in Apache is what caused this to break as it was working under the old system.