JDK-6919626 : CouldNotLoadArgumentException with renamed JNLP shortcut after JNLP file updated
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u18
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2010-01-25
  • Updated: 2011-02-16
  • Resolved: 2010-12-13
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
Win2K setup n:o 1:
  java version "1.6.0_18"
  Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
  Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)
Win2K setup n:o 2: 1.6.0_15
Vista setup: 1.6.0_03
WinXP setup : 1.6.0_17

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
Vista (Version 6.0.6002]
Microsoft Windows XP [versio 5.1.2600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
Mozilla Firefox 3.5 used as the browser

A DESCRIPTION OF THE PROBLEM :
When the desktop shortcut for a JNLP application is renamed and the JNLP file is updated at the server, the second launch  fails with "Unable to launch the application". The subsequent launches fail also. Note that the first launch goes without this problem.

With a brief evaluation, the same issue seems to occur if the desktop shortcut is moved to a different directory.

Combinations tested that have this issue: (all Java 6)
Win 2K + 6u18
Win 2K + 6u15
Windows Vista + 6u3
Win XP + 6u17

Combination tested that did NOT have this issue: (Java 5)
Win XP + 5u14

----

Note that originally this was submitted to comments of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6563938 without specific process to reproduce but since the issue doesn't seem to be the same, a new bug report is submitted.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Setup the jnlp and jar to the server:
  - copy DynamicTreeDemo.jar from http://java.sun.com/docs/books/tutorialJWS/deployment/webstart/ex6/webstart_ComponentArch_DynamicTreeDemo/DynamicTreeDemo.jar to server to a directory available for http
  - set up the JNLP file as presented in the source code section (remember to update the path) - use name "dynamictree.jnlp"
2. Start the dynamictree.jnlp with Web browser and answer to create the desktop shortcut
3. Rename the desktop shortcut
4. Touch/update the jnlp file to update the date (without actual content changes)
5. Start the application from the desktop shortcut (and quit)
6. Start the application second time

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Application should start as normally
ACTUAL -
I get a dialow with "Application Error : Unable to launch the application." (further information is pasted to "Error Message(s)" section.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
More information ->

Exception:
CouldNotLoadArgumentException[ Could not load file/URL specified: C:\Documents and Settings\<username>\Application Data\Sun\Java\Deployment\cache\6.0\60\55df477c-6682e73c]
	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)

Wrapped exception:
java.io.FileNotFoundException: C:\Documents and Settings\<username>\Application Data\Sun\Java\Deployment\cache\6.0\60\55df477c-6682e73c (M����ritetty�� tiedostoa ei l��ydy)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at java.io.FileInputStream.<init>(Unknown Source)
	at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(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)

Concole:
Java Web Start 1.6.0_18
Using JRE version 1.6.0_18-b07 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\<username>
----------------------------------------------------
// Keyboard shortcuts omitted ...
----------------------------------------------------
#### Java Web Start Error:
#### Could not load file/URL specified: C:\Documents and Settings\<username>\Application Data\Sun\Java\Deployment\cache\6.0\60\55df477c-6682e73c


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
<?xml version="1.0" encoding="UTF-8"?>
<!-- Remember to update the server & path -->
<jnlp spec="1.5+"
	codebase="http://server/path"
	href="dynamictree.jnlp">

	<information>
	  <title>Dynamic Tree JNLP Evaluation</title>
	  <vendor>Dynamic Team</vendor>
	  <shortcut online="true">
	    <desktop/>
	  </shortcut>
	</information>

	<resources>
	  <j2se version="1.5+"
	    href="http://java.sun.com/products/autodl/j2se"/>
	  <jar href="DynamicTreeDemo.jar" main="true" />
	</resources>

	<application-desc
	  name="Dynamic Tree Demo Application"
	  main-class="webstartComponentArch.DynamicTreeApplication"
	  width="300"
	  height="300">
	</application-desc>
</jnlp>

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
1. Removing the application from Control Panel / Java seems to fix the issue.

(2) With adding
 <update check="background"/>
to the JNLP file the application works at least until the jars are updated. With brief evaluation the problem seems to occur (on the second startup) after the jars are updated)

(3) Downgrade to Java 5 versions - they don't seem to have this issue (at least 5u14 with WinXP tried)