United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7156244 : change in PluginWindowFactory.createWindow cause problem with FX 2.0.3 runtime

Details
Type:
Bug
Submit Date:
2012-03-23
Status:
Closed
Updated Date:
2012-10-01
Project Name:
JDK
Resolved Date:
2012-04-17
Component:
deploy
OS:
windows
Sub-Component:
plugin
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7u4
Fixed Versions:

Related Reports
Backport:
Backport:
Duplicate:
Relates:

Sub Tasks

Description
install FX 2.0.3 and JRE 7u4, try to load FX applet in browser, it will fail with signature mistach in PluginWindowFactory.createWindow

                                    

Comments
EVALUATION

exception is:

java.lang.AbstractMethodError: com.sun.deploy.uitoolkit.PluginWindowFactory.createWindow(JLjava/lang/String;ZLsun/plugin2/main/client/ModalityInterface;Lsun/plugin2/message/Pipe;I)Lcom/sun/deploy/uitoolkit/Window;
	at sun.plugin2.main.client.PluginMain$AppletFrameCreator.run(Unknown Source)
	at com.sun.deploy.uitoolkit.impl.fx.ui.FXAppContext.invokeLater(Unknown Source)
	at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
PluginMain: could not create embedded frame
                                     
2012-03-23
EVALUATION

problem occur since 7u4 b05, when we added macos plugin support: http://monaco.sfbay.sun.com/detail.jsf?cr=7100315
                                     
2012-03-23
EVALUATION

Problem:  If system has FX 2.0.3 and JRE 7u4 -> you cannot load any FX browser applet due to the following excetion:

java.lang.AbstractMethodError: com.sun.deploy.uitoolkit.PluginWindowFactory.createWindow(JLjava/lang/String;ZLsun/plugin2/main/client/ModalityInterface;Lsun/plugin2/message/Pipe;I)Lcom/sun/deploy/uitoolkit/Window;
	at sun.plugin2.main.client.PluginMain$AppletFrameCreator.run(Unknown Source)
	at com.sun.deploy.uitoolkit.impl.fx.ui.FXAppContext.invokeLater(Unknown Source)
	at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
PluginMain: could not create embedded frame

This is because we changed PluginWindowFactory.createWindow signature in 7u4/FX2u1, to implement our own MacOS plugin.

This is a valid use case because we ship JRE 7u4 runtime offline installer standalone (no co-install of FX).  Only JRE online installer has FX co-install.  So, for example, if people has 7u3 + FX2u3, and they manually install 7u4 runtime offline installer only, they will run into this problem (7u4 + FX 2u3).

For the similar case of 7u3 + FX 2u2 - it works.

Fix:  The argument involved in the signature change is MacOS specific.  For windows, it uses default value in both old (0 - long type) and new (null - String type) case.   We detect if we got the null argument and the AbstractMethodError, and if so, re-try to call into the old method signature with 0 as argument.

No change in FX runtime is needed.

Test:  Make sure FX applet can be loaded in browser with 7u4, using either 2.0.3 or 2.1 FX runtime.
                                     
2012-03-23
SUGGESTED FIX

http://closedjdk.us.oracle.com/jdk8/deploy/deploy/rev/9026551dcd92
                                     
2012-03-23



Hardware and Software, Engineered to Work Together