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 36153 - NPE when create new Resources
Summary: NPE when create new Resources
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-17 00:21 UTC by Nam Nguyen
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 Nam Nguyen 2003-09-17 00:21:09 UTC
Right click Resources node in web project (this
also happen with ejb module project) do New.  Will
see the follwoing NPE stack:

Annotation: Exception occurred in Request Processor
java.lang.NullPointerException
	at
org.netbeans.modules.filesets.DataObjectFileSet.getUrlFor(DataObjectFileSet.java:75)
	at
org.netbeans.modules.filesets.DataObjectFileSet.add(DataObjectFileSet.java:84)
	at
org.netbeans.modules.filesets.AbstractFileSet.add(AbstractFileSet.java:36)
	at
org.netbeans.modules.java.project.classpath.FolderItem.load(FolderItem.java:382)
	at
org.netbeans.modules.java.project.classpath.FolderItem.refreshRoot(FolderItem.java:513)
	at
org.netbeans.modules.java.project.classpath.FolderItem.getRoot(FolderItem.java:227)
	at
org.netbeans.modules.java.project.classpath.FolderItem.getRootFolder(FolderItem.java:250)
	at
org.netbeans.modules.java.project.classpath.FolderItem.getFile(FolderItem.java:236)
	at
org.netbeans.modules.java.project.classpath.FolderItem.hashCode(FolderItem.java:134)
	at
org.openide.util.lookup.InstanceContent$SimpleItem.hashCode(InstanceContent.java:137)
	at java.util.HashMap.hash(HashMap.java:257)
	at java.util.HashMap.put(HashMap.java:375)
	at java.util.HashSet.add(HashSet.java:188)
	at
org.openide.util.lookup.ArrayStorage.add(ArrayStorage.java:93)
	at
org.openide.util.lookup.DelegatingStorage.add(DelegatingStorage.java:75)
	at
org.openide.util.lookup.AbstractLookup.addPair(AbstractLookup.java:159)
	at
org.openide.util.lookup.AbstractLookup$Content.addPair(AbstractLookup.java:769)
	at
org.openide.util.lookup.InstanceContent.add(InstanceContent.java:50)
	at
org.netbeans.modules.java.project.classpath.FolderItem.getCookieLookup(FolderItem.java:304)
	at
org.netbeans.modules.java.project.classpath.FolderItem.getEnvironment(FolderItem.java:173)
	at
org.netbeans.core.xml.FileEntityResolver.findLookup(FileEntityResolver.java:160)
	at
org.netbeans.core.xml.FileEntityResolver.access$200(FileEntityResolver.java:57)
	at
org.netbeans.core.xml.FileEntityResolver$Lkp.update(FileEntityResolver.java:485)
	at
org.netbeans.core.xml.FileEntityResolver$Lkp.beforeLookup(FileEntityResolver.java:451)
	at
org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:413)
	at
org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:346)
	at
org.openide.util.lookup.ProxyLookup$R.allItems(ProxyLookup.java:336)
	at
org.openide.loaders.XMLDataObject$InfoParser.lookupCookie(XMLDataObject.java:1073)
	at
org.openide.loaders.XMLDataObject.getCookie(XMLDataObject.java:268)
	at
org.netbeans.modules.xml.core.XMLDataObject.getCookie(XMLDataObject.java:171)
	at
org.openide.loaders.DataNode.getCookie(DataNode.java:292)
	at
org.openide.nodes.FilterNode.getCookie(FilterNode.java:637)
	at
org.openide.loaders.TemplateWizard1$DataShadowFilterChildren.createNodes(TemplateWizard1.java:199)
	at
org.openide.nodes.Children$Keys$KE.nodes(Children.java:1987)
	at
org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:109)
	at
org.openide.nodes.Children$Info.nodes(Children.java:1083)
	at
org.openide.nodes.Children.updateAdd(Children.java:891)
	at
org.openide.nodes.Children.setEntries(Children.java:678)
	at org.openide.nodes.Children$3.run(Children.java:1878)
	at org.openide.util.Mutex.postRequest(Mutex.java:885)
	at
org.openide.util.Mutex.postWriteRequest(Mutex.java:375)
	at
org.openide.nodes.Children$Keys.applyKeys(Children.java:1886)
	at
org.openide.nodes.Children$Keys.setKeys(Children.java:1868)
	at
org.openide.nodes.FilterNode$ChildrenAdapter.run(FilterNode.java:1190)
	at
org.openide.nodes.FilterNode$Children.updateKeys(FilterNode.java:1146)
	at
org.openide.nodes.FilterNode$Children.filterChildrenAdded(FilterNode.java:1118)
	at
org.openide.nodes.FilterNode$ChildrenAdapter.childrenAdded(FilterNode.java:1207)
	at
org.openide.nodes.Node.fireSubNodesChange(Node.java:849)
	at
org.openide.nodes.Children.notifyAdd(Children.java:926)
	at
org.openide.nodes.Children.updateAdd(Children.java:903)
	at
org.openide.nodes.Children.setEntries(Children.java:678)
	at org.openide.nodes.Children$3.run(Children.java:1878)
	at org.openide.util.Mutex.postRequest(Mutex.java:875)
	at
org.openide.util.Mutex.postWriteRequest(Mutex.java:375)
	at
org.openide.nodes.Children$Keys.applyKeys(Children.java:1886)
	at
org.openide.nodes.Children$Keys.setKeys(Children.java:1845)
	at
org.openide.loaders.FolderChildren.access$500(FolderChildren.java:32)
	at
org.openide.loaders.FolderChildren$ChildrenRefreshRunnable.run(FolderChildren.java:250)
	at org.openide.util.Task.run(Task.java:136)
	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:677)
Comment 1 Vitezslav Stejskal 2003-09-17 13:47:57 UTC
Nam, please, add the PROJECTS keyword to issues filed against new
projects system. Thx.
Comment 2 Nam Nguyen 2003-09-17 16:57:42 UTC
Thanks Vita for the info and will do.  This is my first issuzilla for 
PROJECTS.

Here additional info.  The NPE only happen the first time adding new 
resources.  You can get around by Cancel the New Resource dialog and 
do it the second fine.
Comment 3 Tomas Zezula 2003-09-17 17:17:35 UTC
The NPE is caused when the Lookup is set up for the template of
FolderItem, which has no valid link attribute, I have already a fix, I
will commit it after testing its behaviour.
Comment 4 Tomas Zezula 2003-09-17 17:22:50 UTC
Fixed.
Comment 5 Jan Becicka 2003-11-25 14:01:58 UTC
As described in
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the
current work on projects prototype has been stopped.

Marking issue as VERIFIED --->
Comment 6 Jan Becicka 2003-11-25 14:10:45 UTC
---> CLOSED