NetBeans, JDK Update 12 and Server Registration Woes!

If you have seen a stacktrace like

java.lang.NullPointerException
        at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.isServerValid(ServerWizardVisual.java:155)
        at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.isValid(ServerWizardVisual.java:146)
        at java.awt.Component.invalidateIfValid(Component.java:2711)
        at java.awt.Component.setLocale(Component.java:1780)
        at javax.swing.JComponent.(JComponent.java:600)
        at javax.swing.JPanel.(JPanel.java:82)
        at javax.swing.JPanel.(JPanel.java:109)
        at javax.swing.JPanel.(JPanel.java:117)
        at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.(ServerWizardVisual.java:83)
        at org.netbeans.modules.server.ui.wizard.ServerWizardPanel.getComponent(ServerWizardPanel.java:68)
        at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard$AddServerInstanceWizardIterator.initialize(AddServerInstanceWizard.java:270)
        at org.openide.WizardDescriptor.callInitialize(WizardDescriptor.java:1326)
        at org.openide.WizardDescriptor.(WizardDescriptor.java:410)
        at org.openide.WizardDescriptor.(WizardDescriptor.java:419)
        at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.(AddServerInstanceWizard.java:103)
        at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.(AddServerInstanceWizard.java:90)
        at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.showAddServerInstanceWizard(AddServerInstanceWizard.java:109)
        at org.netbeans.modules.server.ui.manager.ServerManagerPanel.addServer(ServerManagerPanel.java:335)
        at org.netbeans.modules.server.ui.manager.ServerManagerPanel.access$000(ServerManagerPanel.java:84)
        at org.netbeans.modules.server.ui.manager.ServerManagerPanel$.actionPerformed(ServerManagerPanel.java:174)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
        at java.awt.Component.processMouseEvent(Component.java:6218)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3294)
        at java.awt.Component.processEvent(Component.java:5983)
        at java.awt.Container.processEvent(Container.java:2046)
        at java.awt.Component.dispatchEventImpl(Component.java:4578)
        at java.awt.Container.dispatchEventImpl(Container.java:2104)
        at java.awt.Component.dispatchEvent(Component.java:4404)
        at java.awt.LightweightDispatcher.retargetMouseEvent(LightweightDispatcher.java:4565)
        at java.awt.LightweightDispatcher.processMouseEvent(LightweightDispatcher.java:4228)
        at java.awt.LightweightDispatcher.dispatchEvent(LightweightDispatcher.java:4158)
        at java.awt.Container.dispatchEventImpl(Container.java:2090)
        at java.awt.Window.dispatchEventImpl(Window.java:2559)
        at java.awt.Component.dispatchEvent(Component.java:4404)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
        at java.awt.Dialog$.run(Dialog.java:1072)
        at java.awt.Dialog$.run(Dialog.java:1126)
        at java.security.AccessController.doPrivileged(AccessController.java:0)
        at java.awt.Dialog.show(Dialog.java:1124)
        at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:835)
        at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:869)
        at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:857)
        at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:108)
        at org.openide.util.Mutex.doEventAccess(Mutex.java:1355)
        at org.openide.util.Mutex.readAccess(Mutex.java:268)
        at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:842)
        at java.awt.Component.show(Component.java:1483)
        at java.awt.Component.setVisible(Component.java:1435)
        at java.awt.Window.setVisible(Window.java:875)
        at java.awt.Dialog.setVisible(Dialog.java:1011)
        at org.netbeans.api.server.CommonServerUIs.showCustomizer(CommonServerUIs.java:90)
        at org.netbeans.modules.server.ui.manager.ServerManagerAction.performAction(ServerManagerAction.java:61)
        at org.openide.util.actions.CallableSystemAction$.run(CallableSystemAction.java:118)
        at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77)
        at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:114)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:824)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:868)
        at java.awt.Component.processMouseEvent(Component.java:6218)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3294)
        at java.awt.Component.processEvent(Component.java:5983)
        at java.awt.Container.processEvent(Container.java:2046)
        at java.awt.Component.dispatchEventImpl(Component.java:4578)
        at java.awt.Container.dispatchEventImpl(Container.java:2104)
        at java.awt.Component.dispatchEvent(Component.java:4404)
        at java.awt.LightweightDispatcher.retargetMouseEvent(LightweightDispatcher.java:4565)
        at java.awt.LightweightDispatcher.processMouseEvent(LightweightDispatcher.java:4228)
        at java.awt.LightweightDispatcher.dispatchEvent(LightweightDispatcher.java:4158)
        at java.awt.Container.dispatchEventImpl(Container.java:2090)
        at java.awt.Window.dispatchEventImpl(Window.java:2559)
        at java.awt.Component.dispatchEvent(Component.java:4404)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)

You have probably run into issue 150223.

I blew it. When I first checked-in the fix for this issue, I was under the impression that it was only going to happen to folks running the IDE under JDK 7... But it turns out that the changes associated with JDK 7 that started triggering this issue back in October worked their way into JDK 6 update 12.

So, if you are runnning into this stack trace, please try running the IDE under JDK 6 update 10 (which is what I have been using successfully on Solaris for some time) or update 11 (which doesn't seem to be triggering this issue, either).

See this FAQ entry about selecting the JDK used for the IDE process.

I am hopeful that the fix will get rolled into NetBeans 6.5 patch 3.

Update: here is a link to get JDK 6 Update 11

Update2: This issue has been resolved. Read this entry for more info.

Comments:

Ideally the compiler should give a warning stating that the @Override annotation is not present. Currently most IDEs provide the warning (or hint).

It is also bad practice to call non-final methods in a constructor.

Posted by Abraham Tehrani on February 09, 2009 at 03:29 AM PST #

You are right on both counts.

Posted by vince on February 09, 2009 at 03:33 AM PST #

Post a Comment:
Comments are closed for this entry.
About


Vince Kraemer writes the entries in this blog.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News
Blogroll

No bookmarks in folder

automarks