JDK-6794977 : CrossDomainXML problem with multiple threads loading resources at the same time
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6u10,6u14
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows,windows_xp
  • CPU: x86
  • Submitted: 2009-01-16
  • Updated: 2013-01-10
  • Resolved: 2009-12-02
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 6 JDK 7
6u18 b04Fixed 7Fixed
Related Reports
Duplicate :  
Description
install 6u10 or above

clear java cache

visit page:

http://weblogs.java.net/blog/joshy/archive/2008/05/java_doodle_cro.html

Applet will load, but only one image will be loaded.  In console, you will see serveral exception like this:

Exception in thread "Thread-15" java.security.AccessControlException: access denied (java.net.SocketPermission farm4.static.flickr.com:80 connect,resolve)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkConnect(Unknown Source)
	at sun.plugin2.applet.Applet2SecurityManager.checkConnect(Unknown Source)
	at sun.net.www.http.HttpClient.openServer(Unknown Source)
	at sun.net.www.http.HttpClient.<init>(Unknown Source)
	at sun.net.www.http.HttpClient.New(Unknown Source)
	at sun.net.www.http.HttpClient.New(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
	at java.net.URL.openStream(Unknown Source)
	at javax.imageio.ImageIO.read(Unknown Source)
	at photostrip.PhotoResource$2.run(PhotoResource.java:82)
	at java.lang.Thread.run(Unknown Source)

Hit browser refresh, or any subsequent load of the same page will work, all images will be loaded.

Looks like we have problems for initial load of resources with crossdomainxml with multiple threads.

Comments
PUBLIC COMMENTS This fix addresses the synchronization problems in CrossDomainXML.java described in the description. Additional problems referenced in the SDN comments are re filed as CR #6892480
16-10-2009

EVALUATION problem is in CrossDomainXML.java in the call to check(Class[] context, URL url, final String host, int port, int mode) When called once for a given host HOST, in the first Synchronized block, the ArrayList processedHosts gets the HOST name added to it. Then before the host is really processed in the second synchronized block (which is called in a loop), all subsequent calls for the same host will return false.
14-10-2009

EVALUATION This problem exists since day 1 we introduce CrossDomainXML. I don't know root cause or fix yet.
14-05-2009

EVALUATION fix in 6u14
16-01-2009