Ticket #237 (closed enhancement: fixed)

Opened 15 years ago

Last modified 14 years ago

Use icedtea6-plugin for Java

Reported by: andersk Owned by:
Priority: blocker Milestone: Summer 2010 (Lucid Deploy)
Component: -- Keywords:
Cc: Fixed in version:
Upstream bug:  icedtea:166

Description (last modified by broder) (diff)

In theory, debathena-extra-software would like to include the open-source icedtea6-plugin instead of the proprietary sun-java6-plugin. This is currently not possible because icedtea6-plugin doesn’t work in AFS home directories ( icedtea:166).

If there are any other known problems with icedtea6-plugin for Debathena, we should track them here.

Change History

comment:1 Changed 15 years ago by broder

  • Upstream bug changed from http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=312 to icedtea:312

comment:2 Changed 15 years ago by broder

  • Milestone set to Upstream Utopia

comment:3 Changed 14 years ago by broder

  • Upstream bug changed from icedtea:312 to icedtea:166
  • Description modified (diff)

 icedtea:312 was closed as a dup of  icedtea:166

comment:4 Changed 14 years ago by broder

  • Priority changed from minor to critical
  • Milestone changed from Upstream Utopia to Summer 2010 (Lucid Deploy)

This is really something that we need to get fixed. Sun Java is being moved out of the main Ubuntu repositories and into the partners repository, which I frankly just don't trust, so we should consider OpenJDK to be a more or less inevitable part of Debathena's future.

comment:5 Changed 14 years ago by jdreed

I believe the files we want to change are gcjwebplugin.cc and IcedTeaPlugin?.cc. So all that really needs to happen to fix this is someone who speaks C++. Which is not me.

The relevant lines in gcjwebplugin.cc are (1490:1514):

  data_directory = g_strconcat (getenv ("HOME"), "/.gcjwebplugin", NULL);
  if (!data_directory)
    {
      PLUGIN_ERROR ("Failed to create data directory name.");
      return NPERR_OUT_OF_MEMORY_ERROR;
    }
  NPError np_error = NPERR_NO_ERROR;
  gchar* filename = NULL;
  if (!g_file_test (data_directory,
                    (GFileTest) (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)))
    {
      int file_error = 0;

      file_error = g_mkdir (data_directory, 0700);
      if (file_error != 0)
        {
          PLUGIN_ERROR_THREE ("Failed to create data directory",
                              data_directory,
                              strerror (errno));
          np_error = NPERR_GENERIC_ERROR;
          goto cleanup_data_directory;
        }
    }

and in IcedTeaPlugin?.cc (5874:5902):

  data_directory = g_strconcat (getenv ("HOME"), "/.icedteaplugin", NULL);
  if (!data_directory)
    {
      PLUGIN_ERROR ("Failed to create data directory name.");
      return NS_ERROR_OUT_OF_MEMORY;
    }

  if (!g_file_test (data_directory,
                    (GFileTest) (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)))
    {
      int file_error = 0;

      file_error = g_mkdir (data_directory, 0700);
      if (file_error != 0)
        {
          PLUGIN_ERROR_THREE ("Failed to create data directory",
                              data_directory,
                              strerror (errno));
         
          if (data_directory)
          {
            g_free (data_directory);
            data_directory = NULL;
           };

           return NS_ERROR_UNEXPECTED;
        }
    }

comment:6 Changed 14 years ago by jdreed

Evan notes:

Looks like there is Java code that needs to be changed, too:


dr-wily:~/src/openjdk-6-6b18~pre2 broder$ grep -lr '\.icedteaplugin' .
./plugin/icedteanp/java/sun/applet/PluginMain.java
./plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
./plugin/icedteanp/IcedTeaNPPlugin.cc
./plugin/icedtea/sun/applet/PluginMain.java
./plugin/icedtea/sun/applet/PluginAppletSecurityContext.java
./ChangeLog?
./IcedTeaPlugin?.cc

And a similar grep is needed for .gcjwebplugin.

comment:7 Changed 14 years ago by kchen

For what it's worth, I've found an applet that works better under Sun Java than under IcedTea. Both Javas have problems, but Sun Java actually lets me get the job done.

Specifically, this is MITFCU's e-Deposits applet (which is actually a third-party applet) that lets one scan checks and deposit them online. (One has to fake the browser's User-Agent to make the site let you use the applet).

With Sun Java:

  • The page frequently crashes when the applet is loaded
  • The "Load" button that lets users load images sometimes is grayed out (but if this is the case, going to "Deposit History" and back to "New Deposit" makes things work)

With IcedTea:

  • The page doesn't crash
  • The "Load" button is grayed out, and the workaround above doesn't work, as the "Load" button stays grayed out

Neither situation is non-ideal, although Sun Java actually lets me make deposits. I've only tried this on one machine on Jaunty, and I've only attempted to use IcedTea on one day, whereas I've used Sun Java many times.

comment:8 follow-up: ↓ 12 Changed 14 years ago by andersk

kchen: Have you tried reproducing that in Karmic or Lucid? Is there an upstream bug?

comment:9 Changed 14 years ago by kchen

I haven't tried Karmic or Lucid. I can try that. I don't know if there is an upstream bug, although it's also possible that there's a bug with the applet.

comment:10 Changed 14 years ago by jdreed

This has been fixed upstream, according to Bugzilla. Now we need to get it into Lucid.

comment:11 Changed 14 years ago by broder

And, through no fault of our own, this patch was incorporated into the most recent openjdk upload, so it'll be in Lucid.

Now the ball's back in our court - if you think you know of openjdk problems, find a Lucid Beta CD, make sure to grab the latest updates, and see if you still have problems.

comment:12 in reply to: ↑ 8 Changed 14 years ago by kchen

Replying to andersk:

kchen: Have you tried reproducing that in Karmic or Lucid? Is there an upstream bug?

I finally got around to trying this on Karmic with IcedTea. The applet still does not work entirely properly, and the original workaround (clicking "Deposit History") does not work, but I did find a different workaround (clicking the "?" button next to "Scan"). It has not crashed the times I tested it, and so with the new workaround, I believe the IcedTea plugin is now more functional. (However, I have not actually tried Sun Java on the Karmic machine.)

comment:13 Changed 14 years ago by rbasch

On my lucid VM, with openjdk-6-jdk 6b18-1.8-0ubuntu1 and icedtea6-plugin 6b18-1.8-0ubuntu1, the Athena registration applet ( http://web.mit.edu/register) is not displayed consistently. It failed to display the first time loaded in my tries, then usually (but not always) was displayed when I reloaded the page. Running firefox in a terminal, I see:

java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1)
OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)
tsetsize: 130
tsetsize: 191
tsetsize: 130
tsetsize: 344
Exception in thread "Thread-7" java.lang.NullPointerException
	at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:947)
	at sun.applet.AppletPanel.run(AppletPanel.java:607)
	at java.lang.Thread.run(Thread.java:636)
TextBlock: preferredSize called 600 191
TextBlock: preferredSize called 600 40
TextBlock: preferredSize called 600 130
TextBlock: preferredSize called 600 30
TextBlock: preferredSize called 600 344
TextBlock: preferredSize called 600 150
TextBlock: preferredSize called 600 130

The NPE seems to correlate with the applet not appearing.

I saw no problem in a brief test of the Sun JDK.

comment:14 Changed 14 years ago by jdreed

Is the reg applet fixable, given that we're upstream?

Using IcedTea is more a less a given at this point, so we should probably fix things we control, advocate strongly for pseudo-local things like MITFCU, and move on.

comment:15 Changed 14 years ago by jdreed

  • Status changed from new to closed
  • Resolution set to fixed

This is "fixed" in that we have switched to icedtea, because we have no choice.

The reg applet issue is moving to #650.

Note: See TracTickets for help on using tickets.