JDK-6925413 : Java web start unable to run JDK1.3 applications for releases after 6.0.14
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u18
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2010-02-11
  • Updated: 2011-02-16
  • Resolved: 2010-03-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 6 JDK 7
6u21 b01Fixed 7Fixed
Description
FULL PRODUCT VERSION :
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)

(also known to fail (in different ways) - 1.6.0_14, 1.6.0_17)

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

A DESCRIPTION OF THE PROBLEM :
On a client (used FireFox or IE, or from Web Start console) - the latest Java release (1.6.0_18) fails to start a jnlp file that specifies
<j2se version="1.3">

The with the following stack dump is thrown in the webstart console:
java.lang.NoClassDefFoundError: sun/reflect/Reflection
 at com.sun.jnlp.JNLPPreverifyClassLoader.needToApplyFXWorkaround(Unknown Source)
	at com.sun.jnlp.JNLPPreverifyClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
        ....
	

Version 1.6_0.14 fails with a different error as does version 1.6.0_17



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
User types in url to the sample.jnlp file below in a browser causing web start to launch, download the code and (try and) run it.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The HelloWorld dialog shows up on the client when the person envokes the Web Start client.   Changing the JNLP file j2se to 1.4+ makes it work.  This use to work until 1.6.0_14.
ACTUAL -
The with the following stack dump is thrown in the webstart console:
java.lang.NoClassDefFoundError: sun/reflect/Reflection
 at com.sun.jnlp.JNLPPreverifyClassLoader.needToApplyFXWorkaround(Unknown Source)
	at com.sun.jnlp.JNLPPreverifyClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
        ....
	

Version 1.6_0.14 fails with a different error as does version 1.6.0_17



ERROR MESSAGES/STACK TRACES THAT OCCUR :
The with the following stack dump is thrown in the webstart console:
java.lang.NoClassDefFoundError: sun/reflect/Reflection
 at com.sun.jnlp.JNLPPreverifyClassLoader.needToApplyFXWorkaround(Unknown Source)
	at com.sun.jnlp.JNLPPreverifyClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
        ....
	

Version 1.6_0.14 fails with a different error as does version 1.6.0_17



REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
The following simple JNPL file:
 <?xml version="1.0" encoding="utf-8"?>
<!-- JNLP file for locking out users from HERS2 access -->
<!-- This is copied over top of launchpad.jnlp to prevent user login -->
<jnlp
  spec="1.0"
  codebase="http://demo.havard.edu"
  href="jws/launchpad.jnlp">
  <information>
    <title>Example JDK1.3 error</title>
    <vendor>FAS-RO</vendor>
    <homepage href="jws/launchpad.html"/>
    <description>Example JDK1.3 error</description>
    <description kind="short">Web start jdk1.3 error </description>
    <icon href="jws/images/shield2.gif"/>
    <icon kind="splash" href="jws/images/shield2.gif"/>
    <offline-allowed/>
  </information>
  <update check="always" />
  <resources>
    <j2se version="1.3"/>
    <jar href="jws/lib/simple.jar"></jar>
  </resources>
  <security>
      <all-permissions/>
  </security>
  <application-desc main-class="simple.jdk13.HelloFrame">
  </application-desc>
</jnlp>



The following HeloWorld simple JDK1.3 swing class is in the (signed) jar:
 package simple.jdk13;


import javax.swing.JFrame;

public class HelloFrame extends JFrame {
  public static void main(String[] args) {
    new HelloFrame();
  }

  public HelloFrame() {
    this.setSize(200, 100);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setTitle("Hello World!");
    this.setVisible(true);
  }
}

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

CUSTOMER SUBMITTED WORKAROUND :
Haven't found one without backing out the automatic jre updates of our users!

Comments
EVALUATION Problem: 1.6.0_18 fails to start a jnlp file that specifies <j2se version="1.3*"> The with the following stack dump is thrown in the webstart console: java.lang.NoClassDefFoundError: sun/reflect/Reflection at com.sun.jnlp.JNLPPreverifyClassLoader.needToApplyFXWorkaround(Unknown Source) at com.sun.jnlp.JNLPPreverifyClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) .... This is caused by use of sun/reflect/Reflection in JNLPPreverifyClassLoader.needToApplyFXWorkaround. Fix: needToApplyFXWorkaround should only be executed when running with Java 1.5 or above, where JavaFX is supported.
23-02-2010

SUGGESTED FIX http://web-east.east.sun.com/www/webrevs/ngthomas/6925413/webrev/
18-02-2010

EVALUATION The 6u14 bug was fixed in 6u18 b01 (6866991), however, in a later build of 6u18 this bug was re-introduced with the cache pre-verify RFE.
11-02-2010