JDK-6960430 : java.lang.NullPointerException: null peer with Java Web Start (jdk1.6 update 12)
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u12,6u20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp,windows_2008
  • CPU: x86
  • Submitted: 2010-06-11
  • Updated: 2011-02-16
  • Resolved: 2010-09-07
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-rev b11Fixed 7Fixed
Description
FULL PRODUCT VERSION :
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Window XP

A DESCRIPTION OF THE PROBLEM :
 we are getting java.lang.NullPointerException: null peer with java web start for jdk 1.6 update 12 and above.

This exception comes while we are downloading the applet application using java web start.

The application works perfectly fine till JDK1.6 update 11.

Application information :
This is an applet based application, which gets downloaded using java webstart to clients desktop and then applet is launched.

we get exception while downloading.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create an applet based application.
2. Download the application using java webstart to client desktop.



EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Application should get downloaded to clients machine and able to launch.
ACTUAL -
Exception is thrown in download window.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException: null peer

REPRODUCIBILITY :
This bug can be reproduced always.

SUPPORT :
YES

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

Comments
EVALUATION Post 6.0u11, in executeApplet() (in Launcher.java) javaws uses JNLP2Viewer to show the applet and in JNLP2Viewer, it is missing to call pack() on the frame created to show the applet. Calling pack() on the frame in JNLP2Viewer fixes the issue.
30-07-2010

WORK AROUND from customer: We have a workaround for the issue. public void init() { // super.init(); setLayout(null); addNotify(); setSize(877,569); setBackground(Color.lightGray); } The method addNotify in applet init() causes the issue.
02-07-2010