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.
[ JDK VERSION : 1.5.0_02 ] After working for a while on my project I canot start the project anymore, netiher in debug nor in normal mode. what I see is that the IDE does not recognize anymore which class is the main class Error message: => java.lang.NullPointerException at org.netbeans.modules.java.j2seproject.J2SEProjectUtil.hasMainMethod(J2SEProjectUtil.java:229) at org.netbeans.modules.java.j2seproject.J2SEProjectUtil.isMainClass(J2SEProjectUtil.java:164) at org.netbeans.modules.java.j2seproject.J2SEActionProvider.isSetMainClass(J2SEActionProvider.java:475) at org.netbeans.modules.java.j2seproject.J2SEActionProvider.getTargetNames(J2SEActionProvider.java:194) at org.netbeans.modules.java.j2seproject.J2SEActionProvider.invokeAction(J2SEActionProvider.java:125) at org.netbeans.modules.project.ui.actions.MainProjectAction.actionPerformed(MainProjectAction.java:90) at org.openide.windows.TopComponent.processKeyBinding(TopComponent.java:798) at javax.swing.JComponent.processKeyBindings(JComponent.java:2776) at javax.swing.JComponent.processKeyEvent(JComponent.java:2693) at java.awt.Component.processEvent(Component.java:5265) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636) at java.awt.Component.dispatchEventImpl(Component.java:3841) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3803) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) =>
code->j2seproject
wrong component. java->javacore.
Could you please elaborate on why you assigned this to javacore? I don't see any javacore on the stacktrace. The NPE is apparently thrown from J2SE project code. Reassigning back to j2se project.
Simple just look at the line 229 in the J2SEProjectUtil. 227 if (m.getParameters ().size ()==1) { 228 Parameter par = ((Parameter) m.getParameters ().get (0)); 229 String typeName = par.getType ().getName (); If par == NULL => m.getParameters() returns Set containing null -> javacore problem If par.getType() == NULL -> javacore problem
Hm. The J2SEProjectUtil class I have on my disk looks differently. I guess we need to have the exact build number to be sure that we properly evaluated the issue. Johnzoet, could you please attach your IDE log file? ($nbuser/var/log/messages.log)
Problem does not occur anymore.
Reorganization of java component