JDK-6663981 : with JNLP OOPP applets, when one applet on page gets cert Error, all others exit.
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-02-15
  • Updated: 2010-09-08
  • Resolved: 2008-06-17
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.
6u10 b13Fixed
see example at: 
2 of the applets here fail with bad certificate error.  Dismissing this dialog exits the vm.
basic: Main.systemExit(-1) called
java.lang.Exception: Informal: System.exit(-1) called
        at com.sun.javaws.Main.systemExit(Main.java:1099)
        at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(AppPolicy.java:233)
        at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(LaunchDownload.java:1295)
        at com.sun.javaws.LaunchDownload.checkSignedResources(LaunchDownload.java:1132)
        at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(JNLP2Manager.java:960)
        at sun.plugin2.applet.JNLP2Manager.loadJarFiles(JNLP2Manager.java:354)
        at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1096)
        at java.lang.Thread.run(Thread.java:619)

SUGGESTED FIX 6663981 : JNLP applets erroneously shotdown JVM using system.exit() [Ken Russell] Main.systemExit(int) is being called on many occasions within the core JNLP code, which itself calls System.exit(int) unconditionally. Now 'Main.systemExit(int)' throws an ExitException in case of JNLP-OOPP, otherwise it just calls System.exit() and shall not impact with core JAVAWS. Since an exception is being thrown, we have to catch this one in all callees. +++ We also introduce another UI abstraction: "public interface LaunchDownload.DownloadProgressWindow" Instead of an AWT Component, we hold the UI owner as an Object type. This is done to reduce the new exit beahvior dependy of the DownloadWindow UI to JNLP OOPP. +++ testcase: http://j2se.east.sun.com/deployment/www/tests/1.6.0_10/6663981/ webrev: http://sa.sfbay.sun.com/projects/deployment_data/6u10/6663981.4/

SUGGESTED FIX Main.systemExit(int) shall call System.exit() in case of core JAVAWS. In case of JNLP.OOPP it shall throw an ExitException - 'abort', or 'cancel', which must be catched.

EVALUATION Main.systemExit(int) is being called in many occasions within the core JNLP code, which itself calls System.exit(int) unconditionally. In case of JNLP.OOPP, we have follow a different exit pattern.

EVALUATION Definitely reproducible. Unclear at this point which piece of code is causing System.exit() to be called. One suspicious note is that DownloadWindow.initialize() is being called from the JNLP2Manager passing "true" for "exitOnCancel", which is wrong in the context of applets. However this is not likely to be the cause of this particular bug.