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 111884 - NPE while creating a web project
Summary: NPE while creating a web project
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All Linux
: P1 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-03 13:25 UTC by Lukas Jungmann
Modified: 2007-08-08 17:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2007-08-03 13:25:42 UTC
-start IDE w/ CND
-create new C++ app
-create new webapp
-get web app project update from hotfixes UC and install it globally
-restart IDE

=>java.lang.NullPointerException
	at org.netbeans.modules.cnd.makeproject.ui.MakeLogicalViewProvider.findPath(MakeLogicalViewProvider.java:160)
	at org.netbeans.modules.project.ui.ProjectsRootNode.findNode(ProjectsRootNode.java:145)
	at org.netbeans.modules.project.ui.ProjectTab.selectNode(ProjectTab.java:349)
[catch] at org.netbeans.modules.project.ui.ProjectUtilities$3$1.run(ProjectUtilities.java:268)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
...
Comment 1 julieg 2007-08-06 18:24:46 UTC
This bug has impact on NB+packs and should be fixed for CND 551U1
Comment 2 Thomas Preisler 2007-08-07 00:10:50 UTC
I cannot reproduce the bug. I don't see the web app project update on hotfixes UC.

But by looking at our code I can see that it can fail as documented in the attached stack trace. Our code do something like:
    158 File file = FileUtil.toFile((FileObject)target);
        ...
    160 Item item = makeConfigurationDescriptor.findProjectItemByPath(file.getAbsolutePath());
but file is not guarantied to be != null so it would throw an npe in line 160 if file  == null.

I will make another attempt to reproduce, but if I cannot, I will add a null check and return null (means not found),
and ask you to verify the fix.
Comment 3 Thomas Preisler 2007-08-07 19:25:26 UTC
Fixed and committed to release551u1 branch.
Comment 4 Alexander Pepin 2007-08-08 17:06:38 UTC
verified in 5.5.1_u1 CND build (20070808).