JDK-8021381 : JavaFX scene included in Swing JDialog not starting from Web Start
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u25,8
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_7
  • Submitted: 2013-07-25
  • Updated: 2014-05-28
  • Resolved: 2013-08-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40 b38Fixed 8Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
FULL PRODUCT VERSION :
Java Plug-in 10.25.2.17
Using JRE version 1.7.0_25-b17 Java HotSpot(TM) 64-Bit Server VM




ADDITIONAL OS VERSION INFORMATION :
Windows 7

A DESCRIPTION OF THE PROBLEM :
JavaFX scene included in Swing JDialog not starting from Web Start

REGRESSION.  Last worked in version 7u25


ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
at javax.swing.SwingUtilities.appContextGet(SwingUtilities.java:1861)
at javax.swing.JComponent.getDefaultLocale(JComponent.java:2775)
at javax.swing.JComponent.<init>(JComponent.java:600)
at javafx.embed.swing.JFXPanel.<init>(JFXPanel.java:197)
at error.Error.start(Error.java:26)
at com.sun.javafx.applet.FXApplet2$1.run(FXApplet2.java:132)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
at java.lang.Thread.run(Thread.java:724)
Exception in runnable
java.lang.RuntimeException: java.lang.NullPointerException
at com.sun.javafx.applet.FXApplet2$1.run(FXApplet2.java:148)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NullPointerException
at javax.swing.SwingUtilities.appContextGet(SwingUtilities.java:1861)
at javax.swing.JComponent.getDefaultLocale(JComponent.java:2775)
at javax.swing.JComponent.<init>(JComponent.java:600)
at javafx.embed.swing.JFXPanel.<init>(JFXPanel.java:197)
at error.Error.start(Error.java:26)
at com.sun.javafx.applet.FXApplet2$1.run(FXApplet2.java:132)
... 8 more


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
public class Error extends Application {

    @Override
    public void start(Stage primaryStage) {
        StackPane root = new StackPane();

        final Scene scene = new Scene(root, 800, 650);
        final JFXPanel fxPanel = new JFXPanel();
        JDialog jDialog = new JDialog();
        jDialog.add(fxPanel);

        Platform.runLater(new Runnable() {
            @Override
            public void run() {
                fxPanel.setScene(scene);
            }
        });

    }

    public static void main(String[] args) {
        launch(args);
    }
}
---------- END SOURCE ----------
Comments
SQE is ok to take the fix in 7u40. Andrey P explained that this feature is needed for Java One. That it affects customer adoption of FX.
05-08-2013

Please correct me if I am wrong: 1. Bug is limited to JavaFX web start / applets. 2. FX components work ok 3. Swing/AWT does not work at all. So to determine impact we need to know how often customers use Swing/AWT within JavaFX web start / applets. Does anybody know?
05-08-2013

SQE believes that it is probably too late in 7u40 even for such fix. SQE suggests to include in 7u45 due to high impact. Please describe why no automated regression test is provided.
05-08-2013

Leonid, since this is fixed in jdk8 , we need 7u40-critical-request here to describe - webrev link - review link - JPRT build link - issue impact - fix rational -risks -suggested testing (regression test)
02-08-2013

another duplicate issue - https://javafx-jira.kenai.com/browse/RT-31205
31-07-2013

duplicate issue - https://javafx-jira.kenai.com/browse/RT-31276
31-07-2013

we still don't know the right way to fix it, so doubts we'll be able to resolve it in 7u40.
26-07-2013

is it critical or deferral case? At this stage only blocker/stoppers might be submitted as critical, the rest should be 7u40-defer-request
26-07-2013

raising the priority to P2 as this is a regression introduced in 7u25 (Swing/FX interop broken in FX applets)
25-07-2013

This is a known issue. See https://javafx-jira.kenai.com/browse/RT-31205 for more details. As far as I know, AWT is going to resolve this issue in 7u40 (by enabling compatibility mode in AC.getAC() for applets and web start apps), reassigning to AWT.
25-07-2013