United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6698636 Java Plugin in Firefox hangs since 6u4 when remote policy file is present in java.security
JDK-6698636 : Java Plugin in Firefox hangs since 6u4 when remote policy file is present in java.security

Details
Type:
Bug
Submit Date:
2008-05-07
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-06-16
Component:
deploy
OS:
windows_xp
Sub-Component:
plugin
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u4
Fixed Versions:
6u10 (b26)

Related Reports
Backport:

Sub Tasks

Description
When a remote policy file is being used in java.security then firefox will
hang as soon as any applet is being accessed. This worked for 6u3 and earlier.
The bug was introduced in 6u4 and is still there in the latest 6u10beta of May1st.

This is reproducible always on Windows Steps to reproduce:

Install 6 u4|5|6|10beta
Make sure that the plugin is configured for both
IE and Firefox.

Then modify jre\lib\security\java.security like this:

policy.url.1=file:${java.home}/lib/security/java.policy
#policy.url.2=file:${user.home}/.java.policy    <<<< comment out
policy.url.2=http://aubing.germany/ourpolicy.policy <<<< insert

The remote policy file normally contains some grant statements.
For testing, just an empty remote policy file will do.
The link above to aubing.germany points to the empty file
ourpolicy.policy. 

Start IE and access load any demo applet such as 
http://java.sun.com/applets/jdk/1.4/demo/applets/Clock/example1.html
This will work as expected.

Then do the same with firefox. Watch the hang. A thread dump is 
attached

                                    

Comments
WORK AROUND

Use IE
                                     
2008-05-07
EVALUATION

This is caused by a fix in 6u4 to reorder when to create Java plugin viewer.

The url connection in java.security is happening early then Java plugin viewer has been created, therefore it won't be able to find correct Mozilla proxy info and causing hanging (which is a bug in our code and it has never be exposed).
                                     
2008-05-27
SUGGESTED FIX

testcase: http://eltanin.east.sun.com:8000/dennis/bug/dolphin/6.0update/6698636/unitTest.html
webrev: http://sa.sfbay.sun.com/projects/deployment_data/6u10/6698636.0
                                     
2008-07-03



Hardware and Software, Engineered to Work Together