United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6960430 java.lang.NullPointerException: null peer with Java Web Start (jdk1.6 update 12)
JDK-6960430 : java.lang.NullPointerException: null peer with Java Web Start (jdk1.6 update 12)

Details
Type:
Bug
Submit Date:
2010-06-11
Status:
Resolved
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2010-09-07
Component:
deploy
OS:
windows_2008,windows_xp
Sub-Component:
webstart
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u12,6u20
Fixed Versions:
6u21-rev (b11)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

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
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.
                                     
2010-07-02
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.
                                     
2010-07-30



Hardware and Software, Engineered to Work Together