Java plugin does not work after firefox upgrade to 3.6.6

Bug #603873 reported by miguelquiros
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
firefox-3.0 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: firefox-3.0

This bug appears as a branch of bug 600158, where I was told to separate Flash and Java issues. This new bug is related to Java plugin. After upgrading firefox from 3.0.19 to 3.6.6, the java plugin does not work any more. The simlinks in /etc/alternatives point correctly to file libnpjp2.so as indicated in bug 600642 and the plugin shows up in about:plugins, so it seems to be correctly installed and the subject of this bug is then different of 600642.

After trying to load any page containing a java applet, the applet does not work. For example at www.java.com, if I click in "Do I have Java?" and then "Verify Java Version", the java console opens with this series of errors:

java.lang.ClassCastException: sun.awt.motif.MToolkit cannot be cast to sun.awt.X11.XToolkit
 at sun.awt.X11.XEmbeddedFrame.addNotify(XEmbeddedFrame.java:53)
 at sun.plugin2.main.client.PluginEmbeddedFrame.addNotify(PluginEmbeddedFrame.java:46)
 at sun.awt.X11.XEmbeddedFrame.<init>(XEmbeddedFrame.java:43)
 at sun.awt.X11.XEmbeddedFrame.<init>(XEmbeddedFrame.java:60)
 at sun.plugin2.main.client.PluginEmbeddedFrame.<init>(PluginEmbeddedFrame.java:37)
 at sun.plugin2.main.client.PluginMain$StartAppletRunner.run(PluginMain.java:929)
 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
PluginMain: could not create embedded frame

The applet tries it three times before giving up and does not display the expected information.

I am using hardy
firefox is 3.6.6+nobinonly-0ubuntu0.8.04.2
sun-java6-plugin is 6.20dlj-0ubuntu1.8.04.1

This plugin worked fine before firefox update.

Revision history for this message
miguelquiros (mquiros) wrote :

Searching the web, I think I have found a workaround. If firefox is started from the console as:

AWT_TOOLKIT="MToolKit" firefox

looks like java aplets do work.

I have no idea of what is "MToolKit" or "XToolkit" but the environment variable seems to instruct java to use "MToolKit" instead of "XToolKit".

I suppose that the variable can be set permanently in the startup scripts.

Revision history for this message
miguelquiros (mquiros) wrote :

The variable appears in fact defined in /etc/profile but the value is "MToolkit" instead of "MToolKit"

So the workaround is to edit /etc/profile and, in the line:

export AWT_TOOLKIT="MToolkit"

MToolkit should be changed to MToolKit (change lowercase "k" to uppercase "K").

After this, java plugin seems to work.
Perhaps the line in /etc/profile has been added by some bogus installation script that should be fixed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.