United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6663981 : with JNLP OOPP applets, when one applet on page gets cert Error, all others exit.

Details
Type:
Bug
Submit Date:
2008-02-15
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-06-17
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b13)

Related Reports

Sub Tasks

Description
see example at: 
http://web-east.east.sun.com/www/tests/javaws/certtests/1.5/applets.html
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)

                                    

Comments
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/
                                     
2008-02-20
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.
                                     
2008-02-19
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.
                                     
2008-02-19
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.
                                     
2008-02-16



Hardware and Software, Engineered to Work Together