JDK-6494357 : Regression: Cannot run application using jnlp extensions when offline.
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-11-16
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
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
6u1Fixed 7 b13Fixed
Description
FULL PRODUCT VERSION :
java 6 release candidate 1

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
My JNLP file contains the following tags:

      <offline-allowed/>
      <shortcut online="true">
         <desktop/>
      </shortcut>

However, if I am offline, launching the application from the desktop icon results in an error message of the form:

com.sun.deploy.net.FailedDownloadException: Unable to load resource:...(name of my jar file)

whereas if I launch the application 'offline' from the Cache Viewer, it works successfully whether I am actually online or not.

I was able to launch the application offline from the desktop icon using Java 1.5.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a web start application.
Include the above tags.
Download the application using Java 6 RC.
Disconnect from the server hosting the application.
Try to launch the application offline using the desktop icon.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
An attempt to launch the application online, followed by a timeout and the application being launched offline.
ACTUAL -
An error message saying that a resource could not be loaded.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
com.sun.deploy.net.FailedDownloadException: Unable to load resource:...(name of my jar file)

REPRODUCIBILITY :
This bug can be reproduced always.

Comments
SUGGESTED FIX http://web-east.east/deployment/www/webrevs/ngthomas/6494357/webrev/
17-11-2006

SUGGESTED FIX two problems: 1. LaunchDownload.getNativeDirectories always use DownloadEngine.getUpdatedJarFile, which requires network connection to get to the cached Jar. If offline-allowed, should catch IOException and retry with getCachedJarFile ? 2. LaunchDownload.downloadExtensionHelper always use DownloadEngine.getUpdatedFile; should check cacheOnly boolean argument, and use getCachedFile also.
16-11-2006

EVALUATION simple draw application works fine. seems like problem only exists with application using extension. can reproduce the problem with customer's app: Please try my program at: http://www.dakinewave.com/buddy/download.htm You'll be able to see the JNLP there. I wonder if it's because of my use of the Java3D library. Does the fact that they only specify a codebase and not a href in the jnlp tag mean that this isn't cached locally? I thought I'd read something like that somewhere. That said, I can run the application offline if I launch it from the Cache Viewer. stack trace when running without internet connection: network: Connecting socket://127.0.0.1:4429 with proxy=DIRECT network: Cache entry found [url: http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp, version: null] network: Connecting http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp with proxy=HTTP @ scaweb1.sfbay.sun.com:8080 network: Connection http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp, scaweb1.sfbay.sun.com:8080java.net.UnknownHostException: scaweb1.sfbay.sun.com failed: removed from proxy cache java.net.UnknownHostException: download.java.net at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(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.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 com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source) at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source) at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source) at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source) at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source) at com.sun.deploy.net.DownloadEngine.getCachedFile(Unknown Source) at com.sun.deploy.net.DownloadEngine.getUpdatedFile(Unknown Source) at com.sun.javaws.LaunchDownload.downloadExtensionsHelper(Unknown Source) at com.sun.javaws.LaunchDownload.downloadExtensionsHelper(Unknown Source) at com.sun.javaws.LaunchDownload.downloadExtensions(Unknown Source) at com.sun.javaws.Launcher.downloadResources(Unknown Source) at com.sun.javaws.Launcher.prepareLaunchFile(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) network: Connecting http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp with proxy=HTTP @ scaweb1.sfbay.sun.com:8080 network: Connection http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp, scaweb1.sfbay.sun.com:8080java.net.UnknownHostException: scaweb1.sfbay.sun.com failed: removed from proxy cache #### Java Web Start Error: #### Unable to load resource: http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp
16-11-2006