JDK-6777695 : TCK jnlp test jnlp_file/appletDesc/index.html#misc fails with NPE starting 6u12 b01
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u12
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-11-28
  • Updated: 2011-01-19
  • Resolved: 2009-01-30
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
6u12 b03Fixed
Related Reports
Relates :  
Description
TCK jnlp test jnlp_file/appletDesc/index.html#misc fails with NPE starting 6u12 b01

TCK JNLP       : 6.0 b03
J2SE           : FAIL - jdk 6u12 b01, PASS 6u11 b03
Platform[s]    : FAIL - any
switch/Mode    : FAIL - default

The test fails before execution of the test class started. In the console window we could see a stack trace
##TCKHarnesRun##:1227779924968:138093:Thread[Java Web Start Main Thread,5,javawsSecurityThreadGroup]:Java Started
##TCKHarnesRun##:1227779933032:138093:Thread[javawsApplicationMain,5,javawsApplicationThreadGroup]:JNLP Launching
java.lang.NullPointerException
        at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1519)
        at com.sun.deploy.net.DownloadEngine.getCachedFile(DownloadEngine.java:566)
        at com.sun.deploy.net.DownloadEngine.getCachedFile(DownloadEngine.java:548)
        at com.sun.deploy.net.DownloadEngine.getCachedFile(DownloadEngine.java:543)
        at com.sun.javaws.Launcher.executeApplet(Launcher.java:1226)
        at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1139)
        at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:959)
        at com.sun.javaws.Launcher.run(Launcher.java:111)
        at java.lang.Thread.run(Thread.java:619)

Possible reason - incorrect procession of <applet-desc> tag in jnlp file, since this is the only test with this tag. Attempt to start other appet with jnlp file also failed.

Steps to reproduce the test failure:
1. Install JDK 1.6.0_12 b01 (for example to /export/jdk/jdk1.6.0_12)
2. Enable tracing and logging in Java Control Panel. Enable Show console option.
2. Run command /export/jdk/jdk1.6.0_12/bin/javaws http://stt-13/results/1.6.0_12/b01_j4b/TCK-jnlp/jnlp-x86-OpenSolaris/rerun/test.jnlp
Files needed to run the test are accesible from stt-13.russia from /set/stt/newroot/results/1.6.0_12/b01_j4b/TCK-jnlp/jnlp-x86-OpenSolaris/rerun (or from the link above)
Test suite is installed in /set/stt/tck_promotions/jnlp_tck/6.0/beta/b03/binaries/jnlp_tck60 (accessible also from stt-13.russia)

*.jnlp file could be reduced and ordinary clock applet demo could be used to reproduce problem.
Run command /export/jdk/jdk1.6.0_12/bin/javaws http://stt-13/results/1.6.0_12/b01_j4b/TCK-jnlp/jnlp-x86-OpenSolaris/rerun2/test.jnlp
(file are at /set/stt/newroot/results/1.6.0_12/b01_j4b/TCK-jnlp/jnlp-x86-OpenSolaris/rerun2)

jnlp file:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2002 Sun Microsystems, Inc. All rights reserved.-->
<!-- SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.-->
<jnlp spec="0.2+" 
  codebase="http://stt-13/results/1.6.0_12/b01_j4b/TCK-jnlp/jnlp-x86-OpenSolaris/rerun2/">
  <information>
    <title>Test</title>
    <vendor>Sun Microsystems, Inc.</vendor>
  </information>

  <resources>
    <j2se version="1.6"/>
    <jar href="applet.jar"/>
    <jar href="classes.jar"/>
  </resources>
  <applet-desc 
	main-class="Clock"
	name="AppletTest"
	width="100"
	height="300">
  </applet-desc>

</jnlp>

With JDK 6u11 will see an applet demo and with 6u12 will see a stack trace.

Comments
EVALUATION Its due to a bug fix in 6u12 b01: 6740227 DnD: file associations dont work for dragged out applets where we did some code refactoring in the launch sequence of JNLP applets. This caused the failure to start JNLP applet if the JNLP file of the applet has no JNLP href.
02-12-2008

EVALUATION Problem: We failed to start JNLP applet if the JNLP file of the applet has no JNLP href Fix: 1. Use getCanonicalHome to lookup cached JNLP file, so that no-href JNLP file can be found from cache 2. If jnlp file has no href, we cannot fetch it again from the network. use cached copy instead if available.
01-12-2008

SUGGESTED FIX http://web-east.east.sun.com/deployment/www/webrevs/ngthomas/6777695/webrev/
01-12-2008