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 152418 - [65cat] [maven] NullPointerException at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node
Summary: [65cat] [maven] NullPointerException at org.netbeans.modules.maven.nodes.Sour...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milos Kleint
URL: http://statistics.netbeans.org/except...
Keywords: RANDOM
Depends on: 159066
Blocks:
  Show dependency tree
 
Reported: 2008-11-05 12:36 UTC by nvarun
Modified: 2009-05-22 07:23 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 136364


Attachments
stacktrace (6.51 KB, text/plain)
2008-11-05 12:36 UTC, nvarun
Details
stacktrace (6.51 KB, text/plain)
2009-02-02 08:51 UTC, kawazu428
Details
stacktrace (3.00 KB, text/plain)
2009-04-24 18:01 UTC, martin_zmrhal
Details
stacktrace (3.00 KB, text/plain)
2009-04-24 22:47 UTC, big_al
Details
stacktrace (2.39 KB, text/plain)
2009-05-20 15:45 UTC, Oleg Khokhlov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nvarun 2008-11-05 12:36:53 UTC
Build: NetBeans IDE 6.5 RC1 (Build 200810171318)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Windows XP, 5.1, x86

User Comments:
nvarun: Deleted Maven project created using command line..



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node(SourcesNodeFactory.java:99)
        at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node(SourcesNodeFactory.java:79)
        at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.createNodes(NodeFactorySupport.java:142)
        at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.createNodes(NodeFactorySupport.java:120)
        at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1596)
        at org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:168)
Comment 1 nvarun 2008-11-05 12:36:58 UTC
Created attachment 73295 [details]
stacktrace
Comment 2 Milos Kleint 2008-11-05 13:04:48 UTC
I would suggest deleting from the IDE's UI.
Comment 3 nvarun 2008-11-05 13:11:05 UTC
Yes, I did that, I have deleted the project from IDE's UI, though the project was initially created from CLI using
External Maven.
Comment 4 Milos Kleint 2008-11-05 13:29:59 UTC
ok, sorry I misunderstood you..
Comment 5 kawazu428 2009-02-02 08:51:47 UTC
Build: NetBeans IDE Dev (Build 200902011401)
VM: Java HotSpot(TM) Server VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Linux, 2.6.27-11-generic, i386

User Comments: 
deleted maven artifact project

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node(SourcesNodeFactory.java:100)
        at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node(SourcesNodeFactory.java:80)
        at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.createNodes(NodeFactorySupport.java:142)
        at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.createNodes(NodeFactorySupport.java:120)
        at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1602)
        at org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:168)
Comment 6 kawazu428 2009-02-02 08:51:59 UTC
Created attachment 76442 [details]
stacktrace
Comment 7 martin_zmrhal 2009-04-24 18:00:57 UTC
Build: NetBeans IDE 6.7 Beta (Build 200904230001)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Linux, 2.6.27-7-generic, i386

User Comments: 
Deleted Maven Project

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node(SourcesNodeFactory.java:100)
        at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node(SourcesNodeFactory.java:80)
        at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.createNodes(NodeFactorySupport.java:142)
        at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.createNodes(NodeFactorySupport.java:120)
        at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1609)
        at org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:168)
Comment 8 martin_zmrhal 2009-04-24 18:01:06 UTC
Created attachment 80878 [details]
stacktrace
Comment 9 big_al 2009-04-24 22:47:42 UTC
Build: NetBeans IDE Dev (Build 200904220201)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_07-b06-57, Java(TM) SE Runtime Environment, 1.6.0_07-b06-153
OS: Mac OS X, 10.5.6, x86_64

User Comments: 
Updated the pom file of a Maven project

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node(SourcesNodeFactory.java:100)
        at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node(SourcesNodeFactory.java:80)
        at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.createNodes(NodeFactorySupport.java:142)
        at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.createNodes(NodeFactorySupport.java:120)
        at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1609)
        at org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:168)
Comment 10 big_al 2009-04-24 22:47:46 UTC
Created attachment 80889 [details]
stacktrace
Comment 11 Jaroslav Pospisil 2009-05-14 12:46:29 UTC
Can't reproduce with mentioned use cases. Reporters,could you please verify issue is still valid?
Comment 12 Milos Kleint 2009-05-14 13:04:51 UTC
I think it's highly random
Comment 13 Oleg Khokhlov 2009-05-20 15:45:21 UTC
Build: NetBeans IDE Dev (Build 200905190201)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Windows XP, 5.1, x86

User Comments: 
changed ArtifactID and Name in maven project properties

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node(SourcesNodeFactory.java:100)
        at org.netbeans.modules.maven.nodes.SourcesNodeFactory$NList.node(SourcesNodeFactory.java:80)
        at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.createNodes(NodeFactorySupport.java:142)
        at org.netbeans.spi.project.ui.support.NodeFactorySupport$DelegateChildren.createNodes(NodeFactorySupport.java:120)
        at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1609)
        at org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:156)
Comment 14 Oleg Khokhlov 2009-05-20 15:45:26 UTC
Created attachment 82488 [details]
stacktrace
Comment 15 Jaroslav Pospisil 2009-05-20 15:58:50 UTC
Can't reproduce with any of described steps on Vista or Mac.Add please more info or some reproducible steps,otherwise
it's random P2 max.
Comment 16 Oleg Khokhlov 2009-05-20 16:03:32 UTC
I can always reproduce it with following steps:

go to property of a maven app (I created a new one and also used mavencalc from samples);
change ArtifactID to a new one with spaces;

press OK ->NPE
Comment 17 Jaroslav Pospisil 2009-05-20 16:36:59 UTC
Well,the spaces are the main reason in your case - context control when renaming is bad. This is,however, already filed
as iossue 159066,concerning all problems with spaces in project names and so. I will add dependency to that issue and
leave this opened for original causes.

*** This issue has been marked as a duplicate of 159066 ***
Comment 18 Jaroslav Pospisil 2009-05-20 16:39:21 UTC
Ups,my fault,sorry.
Comment 19 Milos Kleint 2009-05-21 10:14:38 UTC
well, the described steps (change artifactid to one with spaces in customizer) doesn't seem to cause an exception for me, I just get a "broken" project, which is 
correct..

Comment 20 Jaroslav Pospisil 2009-05-21 10:29:53 UTC
I'm also unable to reproduce the NPE in this case, however number of user reports indicate,that it's still thrown in
various random cases and should be fixed anyway.I'll lower the priority,however,for it's random nature and no general
100% reproducible case exists.
Comment 21 Milos Kleint 2009-05-21 12:32:14 UTC
do you (any one of the reporters) have  the sources of the project outside of the project directory?

the problem is that the source folder doesn't somehow belong to any project (while the node factory was clearly created with a project attached)
The mystery is why is it happening, could be a deeper problem in filesystems or project infrastructure/threading..

Given the number of reports I will attempt to silently overcome the problem and hope for the best. For a proper investigation we would need some reliable 
steps to reproduce..
Comment 22 Milos Kleint 2009-05-21 13:02:28 UTC
http://hg.netbeans.org/main/rev/b84be1c4fb63 does check for null in the current project owner and will just return null from the method which in turn 
results in no visible node for the sources. Which is probably correct, or at least less harmful.
Comment 23 Oleg Khokhlov 2009-05-21 13:08:53 UTC
and again it happens to me when I delete GroupID in project properties and press OK;

In both cases (spaces in ArtifactID and empty GroupID) I get exception and <Badly Formed Project>.
That happens with a newly created project and with calculator sample as well...
Comment 24 Jaroslav Pospisil 2009-05-21 13:49:20 UTC
I also get <badly formed project> and exception, but not NPE from this issue,rather something different and only in IDE
log. This is, however, connected with issue 159066 and not with this one.
Comment 25 Quality Engineering 2009-05-22 07:23:49 UTC
Integrated into 'main-golden', will be available in build *200905220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b84be1c4fb63
User: Milos Kleint <mkleint@netbeans.org>
Log: #152418 if the owner project for source group is null according to FOQ, just look the other way and pretend there's no sources.. The root cause of the issue is unknown, might be some data inconsistency in projects or filesystems, or it might be connected with external source roots..