java.lang.NullPointerException at org.netbeans.modules.scala.editing.ScalaUtils.isMainMethodPresent(ScalaUtils.java:942) at org.netbeans.modules.scala.editing.ScalaUtils$2.run(ScalaUtils.java:903) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:113) Caused: org.netbeans.modules.parsing.spi.ParseException at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:191) at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:99) at org.netbeans.modules.scala.editing.ScalaUtils.getMainClasses(ScalaUtils.java:886) at org.netbeans.modules.scala.project.J2SEProjectUtil.getMainMethods(J2SEProjectUtil.java:116) at org.netbeans.modules.scala.project.J2SEActionProvider.getTargetNames(J2SEActionProvider.java:498) at org.netbeans.modules.scala.project.J2SEActionProvider$3.run(J2SEActionProvider.java:322) at org.netbeans.api.java.source.ui.ScanDialog.runWhenScanFinished(ScanDialog.java:150) at org.netbeans.modules.scala.project.J2SEActionProvider.invokeAction(J2SEActionProvider.java:360) at org.netbeans.modules.project.ui.actions.FileCommandAction.actionPerformed(FileCommandAction.java:105) at org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed(LookupSensitiveAction.java:166) 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(LightweightDispatcher.java:4556) at java.awt.LightweightDispatcher.processMouseEvent(LightweightDispatcher.java:4220) at java.awt.LightweightDispatcher.dispatchEvent(LightweightDispatcher.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:117) 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)