JDK-7116127 : Shortcut points to non existant image after update of jnlp file and image
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86
  • Submitted: 2011-11-28
  • Updated: 2013-12-25
  • Resolved: 2011-12-19
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 7 JDK 8
7u4Fixed 8 b18Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) Client VM (build 21.1-b02, mixed mode, sharing)

Can also be reproduced with Java 6.

ADDITIONAL OS VERSION INFORMATION :
Windows

A DESCRIPTION OF THE PROBLEM :
Unchanged Web Start icon file with newer date will get downloaded to new cache location, but does not get updated in desktop shortcut.

If file date of jnlp file also changed, then the shortcut will get re-created with old (deleted) icon file.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
STEPS TO REPRODUCE:
- download a web start client
- update some resource jar files on the server
- touch icon file, so it will have a newer date
(JNLP file doesn't change)
- download the updated web start resources from the desktop shortcut


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
EXPECTED RESULT:
If an icon file is downloaded and the old one is deleted from cache, then it should be converted to ICO and the shortcut has to be adjusted.
ACTUAL -
ACTUAL RESULT:
The old icon file is gone from the cache - "Change Icon" from desktop shortcut displays:
Windows can't find file
%USERPROFILE%\AppData\LocalLow\Sun\Java\Deployment\cache\...\5336cb0e-5ff2eb2a.ico

The newly downloaded file (as shown in the trace) is found in the cache.
No new icon file is created and no shortcut update is done.
The icon image will sometimes still be visible on the desptop, because of the Windows Icon Cache.
Sometimes a generic Windows Icon will be displayed instead.


ERROR MESSAGES/STACK TRACES THAT OCCUR :
"Change Icon" from desktop shortcut displays:
Windows can't find file
%USERPROFILE%\AppData\LocalLow\Sun\Java\Deployment\cache\...\5336cb0e-5ff2eb2a.ico


Client download trace:

network: Cache entry found [url: http://myserver:8080/MYPATH/myicon.png, version: null] prevalidated=false/0
...
network: ResponseCode for http://myserver:8080/MYPATH/myicon.png : 200
network: Encoding for http://myserver:8080/MYPATH/myicon.png : gzip
network: Disconnect connection to http://myserver:8080/MYPATH/myicon.png
...
network: ResponseCode for http://myserver:8080/MYPATH/myicon.png : 200
network: Encoding for http://myserver:8080/MYPATH/myicon.png : gzip
network: Sever response: (length: 4901, lastModified: Mon Nov 21 23:35:36 TAHT 2011, downloadVersion: null, mimeType: image/png)
network: Downloading resource: http://mysever:8080/MYPATH/myicon.png
	Content-Length: 4.901
	Content-Encoding: gzip
network: CleanupThread used 2 us
network: Wrote URL http://myserver:8080/MYPATH/myicon.png to File C:\Users\myuser\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\14\5336cb0e-668e88c3-temp


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
jnlp file:
<?xml version="1.0" encoding="UTF-8"?>
<!-- JNLP File to use for Java Webstart  -->
<jnlp
  spec="1.0+"
  codebase="http://myserver:8080/MYPATH"
  href="myApp.jnlp">
  <information>
    <title>Standard Client</title>
    <vendor>Company Name</vendor>
    <description>Webstart configuration for MYAPP</description>
    <icon href="myicon.png"/>
    <shortcut online="true">
      <desktop/>
      <menu submenu="MYAPP"/>
    </shortcut>
  </information>
  <update check="always" policy="always"/>
  <security>
      <all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" initial-heap-size="128M" max-heap-size="256M"/>
...
some jar files
...
 </resources>
  <application-desc main-class="com.xxx">
...
  </application-desc>
</jnlp>
---------- END SOURCE ----------
Verified with build b255-94, on win7/x86.

Comments
Verified with jre8-b120 on win7/x64 using test cases in http://oklahoma.us.oracle.com/www/tests/1.8.0/7116127/
25-12-2013

EVALUATION This bug only addresses the case where both jnlp file and image 7118990 was filed to cover the just image case.
07-12-2011

EVALUATION Generally speaking, a shourtcut will only be re-generated if the JNLP file changes. If however, as stated in the incident report, If a shortcut is re-generated pointing to a non-existant image, or an existing shortcut can later be pointing to a non-existant image, then this is clearly a bug.
06-12-2011