views:

270

answers:

1

When I try to add to the application descriptor in a Netbeans mobile project by clicking on 'Add' in the 'Application Descriptor' panel in the projecct config window nothing happens, netbeans gives a red button on the bottom right indicating an error, clicking on that reveals this:

java.lang.NullPointerException
    at org.netbeans.modules.mobility.project.ui.customizer.AddAttributePanel.getKey(AddAttributePanel.java:135)
    at org.netbeans.modules.mobility.project.ui.customizer.AddAttributePanel.isValid(AddAttributePanel.java:154)
    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.mobility.project.ui.customizer.AddAttributePanel.<init>(AddAttributePanel.java:77)
    at org.netbeans.modules.mobility.project.ui.customizer.CustomizerJad.bEditActionPerformed(CustomizerJad.java:263)
    at org.netbeans.modules.mobility.project.ui.customizer.CustomizerJad.access$000(CustomizerJad.java:79)
    at org.netbeans.modules.mobility.project.ui.customizer.CustomizerJad$3.actionPerformed(CustomizerJad.java:180)
    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.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    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)
    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.pumpEventsForFilter(EventDispatchThread.java:178)
    at java.awt.Dialog$1.run(Dialog.java:1051)
    at java.awt.Dialog$3.run(Dialog.java:1103)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1101)
    at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:867)
    at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:901)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:889)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:109)
    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:874)
    at java.awt.Component.show(Component.java:1516)
    at java.awt.Component.setVisible(Component.java:1468)
    at java.awt.Window.setVisible(Window.java:841)
    at java.awt.Dialog.setVisible(Dialog.java:991)
    at org.netbeans.modules.mobility.project.ui.J2MECustomizerProvider.showCustomizer(J2MECustomizerProvider.java:130)
    at org.netbeans.modules.mobility.project.ui.J2MECustomizerProvider.showCustomizer(J2MECustomizerProvider.java:95)
    at org.netbeans.modules.project.ui.actions.CustomizeProject.actionPerformed(CustomizeProject.java:149)
    at org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed(LookupSensitiveAction.java:161)
    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)

Not at all sure what's causing these, adding application descriptions has never caused this problem to me.

+1  A: 

Hi meds,

I googled it and it seems that quite a few people are getting problems with mobile stuff in NetBeans - though not exactly the same as you're getting. Some suggest to reinstall JDK and NetBeans. See for yourself:

http://www.netbeans.org/issues/show_bug.cgi?id=158100 http://www.nabble.com/Exception-while-adding-Java-ME-MIDP-Emulator-td22029656.html http://www.daniweb.com/forums/thread192925.html#

I'm not sure whether that's any help, but hey, better this than nothing I guess:).

Damo

damo_inc