This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 159390

Summary: NullPointerException when adding new Application Server
Product: java Reporter: liono <liono>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: bongkot
Priority: P2    
Version: 5.x   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: It happened when Add Server

Description liono 2009-03-01 15:41:11 UTC
Note: This only happens using JDK SE6u12, I could reproduce on both Linux and Windows Vista with NetBeans 6.1 and 6.5.

I recently decided to give NB6.5 another test run on Linux. I downloaded the 'SE edition' and added any required plugin
afterwards. After I set everything up I tried adding a new Glassfish server specification using the right mouse button
on the "server" tab in the "Services" window but all I got was a NullPointerException. At first I suspected a 6.1-only
issue after noticing that it reacted the same. I removed the $HOME/.netbeans/6.5 directory and started over, this time
not importing settings and only installing the Java EE support and Glassfish v1,2 plugins. Same problem occurred.

After that I tried stripping 6.1 to the core, only adding Java EE and Glassfish support. The exact same behavior;
NullPointerException after trying to add a server.

Eventually I tried using an older JDK (SE5u16) using the --jdkhome parameter and after doing so I could once more get
into the "Add server wizard". The other way around also applies; now my NB 6.5 defaults to SE6u7, but when I override
this to point explicitly to SE6u12 the problem occurs again.

Finally I can re-produce this problem in Windows Vista as well. I cleanly installed SE6u12 (installed u12, then removed
u11. Now I wish I hadn't :)) and then installed NB 6.5 and added the EE plugins. After setting it all up I cannot add a
new server.

The exact stack trace on Linux:

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:2740)
	at java.awt.Component.setLocale(Component.java:1810)
	at javax.swing.JComponent.<init>(JComponent.java:595)
	at javax.swing.JPanel.<init>(JPanel.java:65)
	at javax.swing.JPanel.<init>(JPanel.java:92)
	at javax.swing.JPanel.<init>(JPanel.java:100)
	at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.<init>(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:295)
	at org.openide.WizardDescriptor.callInitialize(WizardDescriptor.java:1417)
	at org.openide.WizardDescriptor.<init>(WizardDescriptor.java:472)
	at org.openide.WizardDescriptor.<init>(WizardDescriptor.java:481)
	at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.<init>(AddServerInstanceWizard.java:107)
	at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.<init>(AddServerInstanceWizard.java:94)
	at
org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.showAddServerInstanceWizard(AddServerInstanceWizard.java:134)
	at org.netbeans.modules.server.ui.node.AddServerInstanceAction.performAction(AddServerInstanceAction.java:58)
	at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:581)
	at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77)
	at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:577)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
	at java.awt.Component.processMouseEvent(Component.java:6216)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
	at java.awt.Component.processEvent(Component.java:5981)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4583)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4413)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
	at java.awt.Container.dispatchEventImpl(Container.java:2085)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	at java.awt.Component.dispatchEvent(Component.java:4413)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 1 Vince Kraemer 2009-03-01 17:21:28 UTC
see issue 150223 for more info.

*** This issue has been marked as a duplicate of 150223 ***
Comment 2 bongkot 2012-04-27 04:32:32 UTC
Created attachment 118832 [details]
It happened when Add Server