The root of the problem is concurrency writing to the cache directory
files with same names.
to reproduce the problem use the standard example
draw.jnlp
#run javaws
WIN> javaws.exe http://matmech:8080/draw.jnlp
# quickly change modified time for draw.jar and draw.jnlp
matmech> touch draw.jar draw.jnlp
# run quickly javaws with the same url one more time
WIN>javaws.exe http://matmech:8080/draw.jnlp
If your http server do not generate Last-Modified field, or generate it incorrectly you can only run jnlp client two times.
Some times one of the running applications hangs up,
some times generate error message:
An error occurred while launching/running the application.
Title: Draw
Vendor: Sun Microsystems, Inc.
Category: Download Error
Unable to load resource: http://matmech:8080/draw.jar
java.io.IOException: rename failed in cache
at com.sun.javaws.cache.DiskCache.insertEntry(DiskCache.java:211)
at com.sun.javaws.cache.DiskCache.insertResource(DiskCache.java:197)
at com.sun.javaws.cache.DownloadProtocol$RetrieveAction.actionDownload(DownloadProtocol.java:463)
at com.sun.javaws.cache.DownloadProtocol.doDownload(DownloadProtocol.java:609)
at com.sun.javaws.cache.DownloadProtocol.getResource(DownloadProtocol.java:762)
at com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:563)
at com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:469)
at com.sun.javaws.Launcher.downloadResources(Launcher.java:601)
at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:257)
at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:151)
at com.sun.javaws.Launcher.<init>(Launcher.java:113)
at com.sun.javaws.Main.main(Main.java:153)
files with same names.
to reproduce the problem use the standard example
draw.jnlp
#run javaws
WIN> javaws.exe http://matmech:8080/draw.jnlp
# quickly change modified time for draw.jar and draw.jnlp
matmech> touch draw.jar draw.jnlp
# run quickly javaws with the same url one more time
WIN>javaws.exe http://matmech:8080/draw.jnlp
If your http server do not generate Last-Modified field, or generate it incorrectly you can only run jnlp client two times.
Some times one of the running applications hangs up,
some times generate error message:
An error occurred while launching/running the application.
Title: Draw
Vendor: Sun Microsystems, Inc.
Category: Download Error
Unable to load resource: http://matmech:8080/draw.jar
java.io.IOException: rename failed in cache
at com.sun.javaws.cache.DiskCache.insertEntry(DiskCache.java:211)
at com.sun.javaws.cache.DiskCache.insertResource(DiskCache.java:197)
at com.sun.javaws.cache.DownloadProtocol$RetrieveAction.actionDownload(DownloadProtocol.java:463)
at com.sun.javaws.cache.DownloadProtocol.doDownload(DownloadProtocol.java:609)
at com.sun.javaws.cache.DownloadProtocol.getResource(DownloadProtocol.java:762)
at com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:563)
at com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:469)
at com.sun.javaws.Launcher.downloadResources(Launcher.java:601)
at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:257)
at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:151)
at com.sun.javaws.Launcher.<init>(Launcher.java:113)
at com.sun.javaws.Main.main(Main.java:153)
- duplicates
-
JDK-4393792 Downloading new version of running app fails
- Resolved
- relates to
-
JDK-4390297 JaWS works unstable on Windows NT.
- Closed