Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6777695
Votes 0
Synopsis TCK jnlp test jnlp_file/appletDesc/index.html#misc fails with NPE starting 6u12 b01
Category javawebstart:general
Reported Against
Release Fixed 6u12(b03)
State 11-Closed, Verified, bug
Priority: 1-Very High
Related Bugs 6740227
Submit Date 28-NOV-2008
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.
Posted Date : 2008-11-28 13:47:30.0
Work Around
N/A
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.
Posted Date : 2008-12-01 23:28:50.0

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.
Posted Date : 2008-12-02 19:33:25.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang