6

I mark exams for Pearson online using a Java applet called e-PEN on this site. The 'minimum system requirements' state that only Vista or later Windows, and Internet Explorer 9 or later, are supported.

I am using Ubuntu 16.04 and I believe that the correct interpretation of 'minimum system requirements' is that these are the conditions in which I can expect assistance when I contact the ePEN helpdesk.

How can I make ePEN work in Ubuntu, preferably using Firefox?


Bonus section: I have already answered my own question (see below) using Oracle Java 8 BUT I would prefer to use only FOSS. I have uninstalled Oracle Java and made great progress with OpenJDK8 and IcedTea8. After I wrote an elaborate java security policy (basically granting each permission I got an error about in a slow line by line process) and copied the swt.jar into the right directory (as in the Oracle fix), the applet does START with all features. However, I invariably get an InterruptedException thrown within a few seconds:

Caused by: java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:502)
at
    sun.applet.PluginAppletViewer.requestPluginCookieInfo(PluginAppletViewer.java:1266)

(or the same with .requestPluginCookieInfo) which causes the applet to halt. When running firefox in a terminal, I also see these two errors every time:

java.io.FileNotFoundException: https://path/to/applet/parent-url/xbean.jar
java.io.FileNotFoundException: https://path/to/applet/parent-url/tiny_mce_3.5.10.zip.pack.gz

If I try to go to the real URLs or wget them, I get a 404 Not Found error, so I guess those resources just aren't there. I tried downloading an xbean.jar which I put into the same directory as the swt library jar, but this had no effect. I also get a NoClassDef error and a Connection Refused error further down (after the fatal Interrupt error has already been thrown).

All the info I find online relating to these errors is on how to stop them happening from the other side, as the developer. I'm tempted to give up, but still hoping someone will have a clue :)

Zanna
  • 70,465
  • 1
    Is there a way to access this applet without login? – user.dz May 29 '16 at 19:34
  • 1
    @Sneetsher alas, there isn't (or at least there isn't supposed to be a way) & it has a strident notice warning users that the applet is private property, keep login details secure etc. But there are hundreds of people doing this work... I emailed helpdesk asking them just to help me find collaborators because they sent out an email saying they would 'endeavour to support all platforms' but got no response – Zanna May 29 '16 at 19:46

2 Answers2

5

Update for 2017 marking season

Since Firefox have dropped support for plugins, you need to download the Firefox ESR (Extended Support Release). I recommend using this just for running ePEN. Assuming you downloaded it to Downloads, run

cd ~/Downloads
tar xf firefox*
cd firefox
./firefox

When prompted to "set Firefox as default browser", I recommend saying No. Note that running this version instead of the globally installed one, it will still use and update your profile, so you won't see much difference to your usual firefox experience.

Follow the original answer as below.


I have a working solution (tested in 64-bit systems: Ubuntu 16.04, Xubuntu 16.04 and Ubuntu MATE 16.04), but my attempts to make the applet work using OpenJDK-8 and the IcedTea-8 plugin were unsuccessful. If anyone can find a method that avoids using Oracle Java, that will be a big improvement on this answer.

I've only tested this fix in Firefox - please comment with info on how it works in other browsers

Step 1: Install Oracle Java for example using this ppa (I used version 8):

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Step 2 install required libraries

sudo apt-get install libswt-gtk-3-jni libswt-gtk-3-java

Step 3 for 64-bit systems: Go to the exam2score site, log in, click mark student responses and and then 'activate java' answering 'run' 'allow' etc to any security warnings that pop up*. When trying to run the applet you will get an error from the java console: 'Unsatisfied Link Error cannot load 32-bit SWT libraries on 64-bit JVM' To fix this, copy the swt-gtk-3.8.2.jar file to the correct place:

sudo cp /usr/lib/java/swt* /usr/lib/jvm/java-8-oracle/jre/lib/ext

Step 3 for 32-bit systems: (not tested as I can only boot 64-bit Ubuntu, but figured out from my original process. Please comment if you have tested): Loading the applet will fail with a message from the java console: 'unable to load libraries' with a path along the lines of /home/(username)/.swt/lib/linux/x86 you can fix it by making this symlink:

sudo ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86/

*you can get rid of security warnings permanently by telling Firefox to always allow java to run on this page and by setting a site exception in the Java Control Panel security options (search for Java in the dash)

(Note: staring at this and this and related posts for several hours helped me figure out this mystery)


Additional update for 2017 marking session

For some of my papers, I was blocked from logging in: at the login page I would be redirected to the browser health check and could not proceed. The original error was:

This browser is not supported. You must use Internet Explorer 11.

I got around that one by installing the User-Agent switcher Add-on and setting the user agent to Internet Explorer on Microsoft Windows. However, I still got the redirection, now with a complaint about my java version. I got around it in an inelegant fashion:

  • after selecting the paper, grab the actual login page address before it redirects (try taking a screenshot).
  • enter about:config in the URL field
  • find javascript:enable and toggle it to false to disable JavaScript
  • open a new tab and enter the URL of the login page (eg https://wwb.exam2score.com/epen-webapp/jsp/login.jsp)
  • log in with your credentials. It succeeds, but the page features are broken, so...
  • return to your about:config tab and toggle javascript:enable to true
  • return to your exam2score tab and refresh the page.
Zanna
  • 70,465
  • Is the applet using SWT ? If so, you might try to export SWT_GTK3=0 before using the applet with OpenJDK8. – alci Apr 29 '16 at 08:54
  • I did it by appending SWT_GTK3=0 at the end of /etc/environment . You can do that at different levels: see response to this post https://askubuntu.com/questions/751405/how-to-handle-swt-applications-in-16-04 for full stor – alci Apr 29 '16 at 10:44
  • for the really clueless user: 1/ sudo nano /etc/environment 2/ append SWT_GTK3=0 at the end of this file and save 3/ reboot (most simple way) and try – alci Apr 29 '16 at 10:45
  • Thanks for the link - very informative. Since the bug affects oracle java users too, but gtk3 works for me with oracle java, I suspect this fix won't work on my problem. I'll give it a try though! – Zanna Apr 29 '16 at 12:11
  • Well, actually I thinkit does not affect Oracle Jdk users. Using Oracle Jdk is even a proposed workaround. Good luck. – alci Apr 29 '16 at 13:06
1

2018 update: Just to say that this method has worked again: many thanks! Initially there was a glitch, perhaps caused by updates to my system since last summer. Applying Step 3 for 64-bit systems above did the trick.

I'd settled on using SeaMonkey for ePen as it seemed to cope with less adaptation and fiddling. It also avoided having Firefox as my main browser and, separately, having to use Firefox ESR for ePen. However, the Step 3 cure means that both Firefox ESR and SeaMonkey work.

Perhaps some day soon the long-promised browser-independent ePen 2 will avoid all this!

Tom
  • 101