It looks like there is a race condition in recently implemented parallel
downloading of jars for applets and web-start (see 6689313).
Starting from 6u18b03 javaws and plugins fails pretty regularly with
java.io.IOException: Cannot find cached resource for URL: file:<path to application jar>
at com.sun.deploy.net.DownloadEngine.getCacheResourceFilePath(Unknown Source)
at com.sun.javaws.LaunchDownload.getSignedJNLPFile(Unknown Source)
at com.sun.javaws.LaunchDownload.checkSignedLaunchDescHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.checkSignedLaunchDesc(Unknown Source)
at com.sun.javaws.Launcher.prepareResources(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
One concurrent exception on the download thread that can potentially prevent downloading of jars.
I found this exception from my own tests. This exception is not showing in Katya's test trace though.
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at com.sun.javaws.LaunchDownload$DownloadCallbackHelper.getProgressRecord(LaunchDownload.java:479)
at com.sun.javaws.LaunchDownload$DownloadCallbackHelper.downloading(LaunchDownload.java:432)
at com.sun.deploy.net.DownloadEngine$4.downloadProgress(DownloadEngine.java:1348)
at com.sun.deploy.net.HttpDownloadHelper.decompressWrite(HttpDownloadHelper.java:261)
at com.sun.deploy.net.HttpDownloadHelper.download(HttpDownloadHelper.java:134)
at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Cache.java:526)
at com.sun.deploy.cache.Cache.downloadResourceToCache(Cache.java:487)
at com.sun.deploy.net.DownloadEngine.actionDownload(DownloadEngine.java:1359)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1524)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1502)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1605)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1533)
at com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:217)
at com.sun.javaws.LaunchDownload$DownloadTask.call(LaunchDownload.java:1643)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)