JDK-6563938 : CouldNotLoadArgumentException when starting an updated JWS application
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6,6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-05-31
  • Updated: 2011-02-16
  • Resolved: 2011-02-09
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
7Resolved
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

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

A DESCRIPTION OF THE PROBLEM :
When the jnlp file is updated at the server, JWS fails to start the application the first time. "Unable to launch the application" message is shown instead. This happens with only some jnlp file contents, not all. At least <property> tags and os attributes in resources seem to have some impact. The effect of the content seems quite illogical, so there might be other tags and attributes effecting too.

The symptoms are exactly like in 6446676, which is reported to be fixed in mustang(b94).

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- download http://java.sun.com/products/javawebstart/apps/draw.jar to your web server to some directory
- save the following as draw.jnlp in the same directory:
-------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>

<jnlp spec="0.2 1.0"
      codebase="http://server/path/"
      href="draw.jnlp">
   <information>
      <title>Draw 4 App</title>
      <vendor>Sun Microsystems, Inc.</vendor>
      <homepage href="http://java.sun.com/products/javawebstart/demos.html"/>
      <description>A minimalist drawing application along the lines of Illustrator</description>
      <description kind="short">Draw Demo Short Description</description>
      <icon href="images/draw.jpg"/>
      <offline-allowed/>
   </information>
   <resources os="Win">
      <property name="sun.java2d.noddraw" value="false"/>
      <j2se version="1.3+" href="http://java.sun.com/products/autodl/j2se"/>
      <j2se version="1.3+"/>
      <jar href="draw.jar" main="true" download="eager"/>
   </resources>
   <application-desc main-class="Draw"/>
</jnlp>
-------------------------------------------------------------------------
(note: change the codebase in this example to correct one)
- open draw.jnlp with browser -> draw app starts
- run command touch draw.jnlp in the server
- open draw.jnlp with browser

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Draw application starts
ACTUAL -
Unable to start application appears.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Details for "Unable to launch the application" message:
Exception:
CouldNotLoadArgumentException[ Could not load file/URL specified: D:\Documents and Settings\aa015037\Application Data\Sun\Java\Deployment\cache\6.0\59\1c52e23b-1084115d]
	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: D:\Documents and Settings\aa015037\Application Data\Sun\Java\Deployment\cache\6.0\59\1c52e23b-1084115d (The system cannot find the file specified)
	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)

Console:
Java Web Start 1.6.0_01
Using JRE version 1.6.0_01 Java HotSpot(TM) Client VM
User home directory = D:\Documents and Settings\aa015037
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
#### Java Web Start Error:
#### Could not load file/URL specified: D:\Documents and Settings\aa015037\Application Data\Sun\Java\Deployment\cache\6.0\59\1c52e23b-1084115d


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
These changes seem to help with this demo draw app example:
- remove the <property> -tag
- remove os="Win" attribute from resource tag
- change os="Win" to os="Windows"

Comments
EVALUATION this should be fixed with: 6923172: Renaming desktop shortcut causes application to fail to launch after two updates If given arg file is not found, we launch from original url.
09-02-2011

EVALUATION from the latest comments from developers on http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6563938, this might be fixed by 6809125: Desktop short-cut doesn't work for java application after installation of 6u12 fix will be in 6u14
25-02-2009