United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6706212 NullPointer exception at startup with Nimbus Look and Feel
JDK-6706212 : NullPointer exception at startup with Nimbus Look and Feel

Details
Type:
Bug
Submit Date:
2008-05-22
Status:
Closed
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2008-06-09
Component:
client-libs
OS:
windows_xp,windows
Sub-Component:
javax.swing
CPU:
x86,generic
Priority:
P1
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b26)

Related Reports
Duplicate:
Relates:

Sub Tasks

Description
FULL PRODUCT VERSION :
C:\Documents and Settings\TRA.PDPRIMARY>java -version
java version "1.6.0_10-beta"
Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b24)
Java HotSpot(TM) Client VM (build 11.0-b12, mixed mode, sharing)

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

XP SP 3

EXTRA RELEVANT SYSTEM CONFIGURATION :
DbVisualizer 6.07 from http://www.minq.se/products/dbvis/download/

A DESCRIPTION OF THE PROBLEM :
When starting DbVisualizer the following NullPointerException is produced immediately at startup:

An internal error occurred:

Exception: java.lang.NullPointerException
java.lang.NullPointerException

The error may have affected the application state.
Please notify vendor.

Stack Trace:

java.lang.NullPointerException
    at javax.swing.JTable.setSelectionBackground(Unknown Source)
    at javax.swing.plaf.basic.BasicTableUI.installDefaults(Unknown Source)
    at javax.swing.plaf.basic.BasicTableUI.installUI(Unknown Source)
    at javax.swing.JComponent.setUI(Unknown Source)
    at com.jidesoft.grid.JideTable.updateUI(Unknown Source)
    at com.jidesoft.grid.NavigableTable.updateUI(Unknown Source)
    at com.jidesoft.grid.CellSpanTable.updateUI(Unknown Source)
    at com.jidesoft.grid.CategorizedTable.updateUI(Unknown Source)
    at javax.swing.JTable.<init>(Unknown Source)
    at javax.swing.JTable.<init>(Unknown Source)
    at com.jidesoft.grid.JideTable.<init>(Unknown Source)
    at com.jidesoft.grid.ContextSensitiveTable.<init>(Unknown Source)
    at com.jidesoft.grid.NavigableTable.<init>(Unknown Source)
    at com.jidesoft.grid.CellStyleTable.<init>(Unknown Source)
    at com.jidesoft.grid.CellSpanTable.<init>(Unknown Source)
    at com.jidesoft.grid.CategorizedTable.<init>(Unknown Source)
    at com.jidesoft.grid.SortableTable.<init>(Unknown Source)
    at com.onseven.dbvis.Z.A.<init>(Z:16)
    at com.onseven.dbvis._.E.J.??(Z:2605)
    at com.onseven.dbvis._.E.J.??(Z:1758)
    at com.onseven.dbvis._.E.J.<init>(Z:210)
    at com.onseven.dbvis._.E.F.??(Z:455)
    at com.onseven.dbvis._.E.F.??(Z:3487)
    at com.onseven.dbvis._.E.F.<init>(Z:347)
    at com.onseven.dbvis._.A.C.??(Z:841)
    at com.onseven.dbvis._.A.C.??(Z:3527)
    at com.onseven.dbvis._.A.C.<init>(Z:3039)
    at com.onseven.dbvis.DbVisualizer.??(Z:1661)
    at com.onseven.dbvis.DbVisualizer.??(Z:1934)
    at com.onseven.dbvis.DbVisualizer.??(Z:3286)
    at com.onseven.dbvis.DbVisualizer$A.construct(Z:2360)
    at se.pureit.swing.util.SwingWorker$2.run(Z:1192)
    at java.lang.Thread.run(Unknown Source)


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install DbVisualizer and run it.

Open Tools -> Properties.

Under General -> Apperances, select Nimbus, and click Ok.

When restarting DbVisualizer it immediately shows an error dialogue.



REPRODUCIBILITY :
This bug can be reproduced always.

                                    

Comments
EVALUATION

Looks like some more missing UIManager keys needed by basic laf.
                                     
2008-05-28
SUGGESTED FIX

Fix Basic LAF where it gets UIManager keys to use defaults any where it causes exceptions.
                                     
2008-05-29
EVALUATION

I think we need to do a more thorough look at using Basic LAF UI delegates with Nimbus as this is the 4th or 5th bug from this. Although there is no requirement for this to work it happens to work on all the other Sun LAFs so people expect it to work with Nimbus.

Attached is a test class that tests all components with BasicUI delegates and causes many expetions before this fix. I also tested with the DbVisualizer application and JIDESoft demo suite to see if they caused any exceptions. I tested with JIDESoft demos because the component in DbVisualizer that was causeing the exception is one of the JIDE Component suite.

So hopefully this will be the last bug related to issues mixing Basic UI delegates with Nimbus LAF.
                                     
2008-05-29



Hardware and Software, Engineered to Work Together