JDK-6494365 : In JNLP file href must end with .jar extension
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86,sparc
  • 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
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b104)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b104, mixed mode, sharing)

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

EXTRA RELEVANT SYSTEM CONFIGURATION :
tomcat web server version 5.5.7

A DESCRIPTION OF THE PROBLEM :
when referencing a jar resource in the jnlp file via the href reference the href reference must end in .jar for web start to download the jar.

working example:
<jar href="/ICE/Jar/commons-httpclient-3.0.jar"/>

downloads fine in jre 1.5.x and jre 1.6.x

bug example: <jar href="/ICE/Jar/commons-httpclient-3.0.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>

downloads fine in jre 1.5.x  broken in jre 1.6.x

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
create a jar resource that can be downloaded from a web server with a url that does not end in .jar.
Reference this url in a jnlp file.

example: <jar href="/ICE/Jar/commons-httpclient-3.0.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>

downloads fine in jre 1.5.x  broken in jre 1.6.x

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The jar file is downloaded from the url and used by the application launched via the jnlp file
ACTUAL -
The application referenced in the jnlp file does not start

ERROR MESSAGES/STACK TRACES THAT OCCUR :
No information is displayed in the java console

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://localhost:8080/ICE">
<information>
<title>Segment Control</title>
<vendor>ICE</vendor>
<homepage href="http://localhost:8080/ICE/index.html"/>
<description kind="short"></description>
</information>
<security><all-permissions/></security>
<resources>
<j2se version="1.5+" initial-heap-size="64M" max-heap-size="128M" href="http://java.sun.com/products/autodl/j2se"/>
<jar main="true" href="/ICE/Jar/AppSegmentControl.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/jdom.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/commons-codec-1.3.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/commons-httpclient-3.0.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/commons-logging.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/junit-4.0.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/forms-1.0.7.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/junit-4.0.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/jfreechart-1.0.1.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/jcommon-1.0.0.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/synthetica.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/spring.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/log4j-1.2.12.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/ICEProjectLib.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
<jar href="/ICE/Jar/looks-2.0.2.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/>
</resources>
<application-desc main-class="com.ice.desktop.controller.AppSegCtrlLaunch">
<argument>BD307F0DDCF0F9E36B9D4C16F30DF601</argument>
<argument>150</argument>
</application-desc>
</jnlp>


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

Release Regression From : 5.0u9
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Comments
EVALUATION The chosen fix was to both try trimming suffixes from the file name as well as to check the MIME type of the returned file in case it does not end in either .jar or .jarjar. Fixed in Java SE 7, we believe in build 04 (integration schedule is not available yet -- should definitely be integrated by build 06).
04-12-2006

SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/dolphin/6494365.2
04-12-2006

EVALUATION The issue of 6497360 is similar to this one. Checking for the MIME types associated with jar files and jar diffs (suggested by ###@###.###) rather than specific file name extensions is a more robust solution to the problem.
01-12-2006

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

EVALUATION can reproduce problem now using tomcat. jsessionid is supported by default with tomcat.
17-11-2006

EVALUATION I tried with 5u9 but I cannot get the application to launch with <jar href="/ICE/Jar/commons-httpclient-3.0.jar;jsessionid=BD307F0DDCF0F9E36B9D4C16F30DF601"/> same for 6.0. will contact the submitter to get more information on how to reproduce the bug. Java Web Start 1.5.0_09 Using JRE version 1.5.0_09 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\ngthomas ---------------------------------------------------- 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 0-5: set trace level to <n> ---------------------------------------------------- basic: Java part started basic: jnlpx.jvm: C:\Program Files\Java\jre1.5.0_09\bin\javaw.exe basic: jnlpx.splashport: 1255 basic: jnlpx.remove: true basic: jnlpx.heapsize: NULL,NULL network: Loading user-defined proxy configuration ... network: Done. network: Browser is "C:\Program Files\Internet Explorer\iexplore.exe" -nohome network: Browser is IE network: Loading proxy configuration from Internet Explorer ... network: Done. network: Loading manual proxy configuration ... network: Convert proxy bypass list to regular expression: network: scaweb1.sfbay.sun.com:8080 --> SCAWEB1.SFBAY.SUN.COM:8080 network: <local> --> [^.]+ network: Done. network: Proxy Configuration: Manual Configuration Proxy: http=scaweb1.sfbay.sun.com:8080,https=scaweb1.sfbay.sun.com:8080,ftp=scaweb1.sfbay.sun.com:8080,gopher=scaweb1.sfbay.sun.com:8080 Proxy Overrides: scaweb1.sfbay.sun.com:8080,<local> basic: new Launcher: <jnlp spec="0.2 1.0" codebase="http://capoon.sfbay.sun.com/6494365/" href="http://capoon.sfbay.sun.com/6494365/draw.jnlp"> <information> <title>Draw</title> <vendor>Sun</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> </information> <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+"/> <jar href="http://capoon.sfbay.sun.com/6494365/draw.jar;jsessionid=fjdklajflajfasljkljsdfas" download="eager" main="true"/> </resources> <application-desc main-class="Draw"/> </jnlp> network: Skipping download step network: Connection to: http://capoon.sfbay.sun.com/6494365/draw.jnlp network: Connecting http://capoon.sfbay.sun.com/6494365/draw.jnlp with proxy=HTTP @ scaweb1.sfbay.sun.com/129.145.155.90:8080 network: Connecting http://capoon.sfbay.sun.com/6494365/draw.jnlp with cookie "SUN_ID=70.231.238.70:41271155336685; nfSettings=112%7CMET%7Cen%7C; basicEdition=NO" network: encoding = null for http://capoon.sfbay.sun.com/6494365/draw.jnlp network: Sever response: (length: 984, lastModified: Thu Nov 16 15:06:36 PST 2006, downloadVersion null, mimeType: application/x-java-jnlp-file) network: Doing download network: Doing download network: download:encoding GZIP/Plain = null network: Wrote URL http://capoon.sfbay.sun.com/6494365/draw.jnlp to file C:\Documents and Settings\ngthomas\Application Data\Sun\Java\Deployment\cache\javaws\http\Dcapoon.sfbay.sun.com\P80\DM6494365\java-XMdraw.jnlp19014tmp network: Disconnect connection to http://capoon.sfbay.sun.com/6494365/draw.jnlp network: Found in cache: DisckCacheEntry[A;http://capoon.sfbay.sun.com/6494365/draw.jnlp;null;1163718396000;C:\Documents and Settings\ngthomas\Application Data\Sun\Java\Deployment\cache\javaws\http\Dcapoon.sfbay.sun.com\P80\DM6494365\AMdraw.jnlp;null] network: Created version ID: 0.2 network: Created version ID: 1.0 network: Created version ID: 1.5 network: Created version ID: 1.5 network: Created version ID: 1.0 basic: LaunchDesc location: http://capoon.sfbay.sun.com/6494365/draw.jnlp, version: null network: Found in cache: DisckCacheEntry[A;http://capoon.sfbay.sun.com/6494365/draw.jnlp;null;1163718396000;C:\Documents and Settings\ngthomas\Application Data\Sun\Java\Deployment\cache\javaws\http\Dcapoon.sfbay.sun.com\P80\DM6494365\AMdraw.jnlp;null] network: Skipping download step network: Created version ID: 1.5+ network: Created version ID: 1.4.2.13 basic: isCurrentRunningJREHeap: passed args: -1, -1 basic: JnlpxArgs is -1, -1 network: Created version ID: 1.4.2.10 basic: isCurrentRunningJREHeap: passed args: -1, -1 basic: JnlpxArgs is -1, -1 network: Created version ID: 1.5.0.09 basic: isCurrentRunningJREHeap: passed args: -1, -1 basic: JnlpxArgs is -1, -1 basic: LaunchSelection: findJRE: Match on current JRE network: Created version ID: 1.5.0.09+ network: Created version ID: 1.5.0.09 basic: Offline mode: false IsInCache: false forceUpdate: true Installed JRE: JREInfo for index 2: platform is: 1.5 product is: 1.5.0_09 location is: http://java.sun.com/products/autodl/j2se path is: C:\Program Files\Java\jre1.5.0_09\bin\javaw.exe osname is: Windows osarch is: x86 enabled is: true registered is: true system is: false IsInstaller: false network: Connecting socket://127.0.0.1:1255 with proxy=DIRECT network: Connection to: http://capoon.sfbay.sun.com/6494365/draw.jnlp network: Connecting http://capoon.sfbay.sun.com/6494365/draw.jnlp with proxy=HTTP @ scaweb1.sfbay.sun.com/129.145.155.90:8080 network: Connecting http://capoon.sfbay.sun.com/6494365/draw.jnlp with cookie "SUN_ID=70.231.238.70:41271155336685; nfSettings=112%7CMET%7Cen%7C; basicEdition=NO" network: encoding = null for http://capoon.sfbay.sun.com/6494365/draw.jnlp network: Sever response: (length: 984, lastModified: Thu Nov 16 15:06:36 PST 2006, downloadVersion null, mimeType: application/x-java-jnlp-file) network: Disconnect connection to http://capoon.sfbay.sun.com/6494365/draw.jnlp network: Contacting server for JAR file sizes network: Connection to: http://capoon.sfbay.sun.com/6494365/draw.jar;jsessionid=fjdklajflajfasljkljsdfas network: Connecting http://capoon.sfbay.sun.com/6494365/draw.jar;jsessionid=fjdklajflajfasljkljsdfas with proxy=HTTP @ scaweb1.sfbay.sun.com/129.145.155.90:8080 network: Connecting http://capoon.sfbay.sun.com/6494365/draw.jar;jsessionid=fjdklajflajfasljkljsdfas with cookie "SUN_ID=70.231.238.70:41271155336685; nfSettings=112%7CMET%7Cen%7C; basicEdition=NO" network: encoding = null for http://capoon.sfbay.sun.com/6494365/draw.jar;jsessionid=fjdklajflajfasljkljsdfas #### Java Web Start Error: #### Unable to load resource: http://capoon.sfbay.sun.com/6494365/draw.jar;jsessionid=fjdklajflajfasljkljsdfas basic: User selected: 1
16-11-2006