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.
Summary: | NullPointerException at org.netbeans.modules.debugger.jpda.projects.MainProjectManager.getProjectRoots | ||
---|---|---|---|
Product: | groovy | Reporter: | shayne <shayne> |
Component: | Grails | Assignee: | martin_adamek <martin_adamek> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | mentlicher, shayne, tonybeckham |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=117076 | ||
Issue Type: | DEFECT | Exception Reporter: | 117076 |
Attachments: |
stacktrace
stacktrace |
Description
shayne
2008-09-23 17:34:10 UTC
Created attachment 70346 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200809240201) VM: Java HotSpot(TM) Client VM, 1.5.0_13-119, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05-237 OS: Mac OS X, 10.5.5, i386 User Comments: I created a new grails project and changed the name to something other than the default. When the project was created the exception was thrown. Stacktrace: java.lang.NullPointerException at org.netbeans.modules.debugger.jpda.projects.MainProjectManager.getProjectRoots(MainProjectManager.java:163) at org.netbeans.modules.debugger.jpda.projects.MainProjectManager.isDependent(MainProjectManager.java:142) at org.netbeans.modules.debugger.jpda.projects.MainProjectManager.getMainProject(MainProjectManager.java:105) at org.netbeans.modules.debugger.jpda.projects.StepIntoActionProvider.shouldBeEnabled(StepIntoActionProvider.java:130) at org.netbeans.modules.debugger.jpda.projects.StepIntoActionProvider.access$200(StepIntoActionProvider.java:70) at org.netbeans.modules.debugger.jpda.projects.StepIntoActionProvider$Listener.doSetEnabled(StepIntoActionProvider.java:181) Created attachment 70529 [details]
stacktrace
I did not reproduced that so easily. Perhaps it's necessary to setup the project somehow? IMHO it's a bug of the SourceGroup that it returns a null root folder. I've reproduced it only when I explicitely deleted empty "java" folder from src. CVS probably pruned the empty directories, therefore you got the NPE. It's caused by non-existent source root file. This is a bug at org.netbeans.modules.groovy.grailsproject.GrailsSources.getSourceGroups(): Folloging code creates a source group with null root: return new SourceGroup[] { new Group(projectDir.getFileObject("src/java"), NbBundle.getMessage(GrailsSources.class, "LBL_SrcJava")) }; Detection of bad source groups added in changeset: 103886:f736a89f6caa http://hg.netbeans.org/main/rev/f736a89f6caa It cause other problems as well: java.lang.IllegalArgumentException: Tried to pass null folder arg at org.openide.filesystems.FileUtil.isParentOf(FileUtil.java:1229) at org.netbeans.modules.refactoring.java.RetoucheUtils.isOnSourceClasspath(RetoucheUtils.java:345) at org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider.canRename(RefactoringActionsProvider.java:221) at org.netbeans.modules.refactoring.api.impl.ActionsImplementationFactory.canRename(ActionsImplementationFactory.java:59) at org.netbeans.modules.refactoring.spi.impl.RenameAction.enable(RenameAction.java:74) at org.netbeans.modules.refactoring.spi.impl.RefactoringGlobalAction$ContextAction.isEnabled(RefactoringGlobalAction.java:165) at org.netbeans.modules.refactoring.spi.impl.RSMDataObjectAction.createContextAwareInstance(RSMDataObjectAction.java:92) at org.openide.util.Utilities.actionsToPopup(Utilities.java:2661) at org.openide.util.Utilities.actionsToPopup(Utilities.java:2753) at org.openide.explorer.view.TreeView.createPopup(TreeView.java:953) at org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:1431) at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:182) at org.openide.awt.MouseUtils$PopupMouseAdapter.mousePressed(MouseUtils.java:173) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.Component.processMouseEvent(Component.java:6195) at javax.swing.JComponent.processMouseEvent(JComponent.java:3293) at java.awt.Component.processEvent(Component.java:5963) at java.awt.Container.processEvent(Container.java:2101) at java.awt.Component.dispatchEventImpl(Component.java:4558) at java.awt.Container.dispatchEventImpl(Container.java:2159) at java.awt.Component.dispatchEvent(Component.java:4384) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4595) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4255) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4188) at java.awt.Container.dispatchEventImpl(Container.java:2145) at java.awt.Window.dispatchEventImpl(Window.java:2559) at java.awt.Component.dispatchEvent(Component.java:4384) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:604) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177) at java.awt.EventDispatchThread.run(EventDispatchThread.java:138) Integrated into 'main-golden', will be available in build *200809270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/f736a89f6caa User: mentlicher@netbeans.org Log: #148076 - Detect bad source groups. Already fixed. |