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 138881

Summary: NullPointerException at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.getProjectFor
Product: projects Reporter: Vince Kraemer <vkraemer>
Component: Ant ProjectAssignee: Milan Kubec <mkubec>
Status: RESOLVED WORKSFORME    
Severity: blocker CC: marco_bresciani
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=71746
Issue Type: DEFECT Exception Reporter: 71746
Attachments: stacktrace
stacktrace
stacktrace

Description Vince Kraemer 2008-07-03 01:18:58 UTC
Build: NetBeans IDE 6.1 (Build 200807020101)
VM: Java HotSpot(TM) Client VM, 1.5.0_15-b04, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_15-b04
OS: SunOS, 5.10, x86

User Comments: 
I had some nb module projects open in the IDE.

I updated my IDE.  The modules do not appear in the projects window.
Comment 1 Vince Kraemer 2008-07-03 01:19:07 UTC
Created attachment 63852 [details]
stacktrace
Comment 2 Milan Kubec 2008-07-04 15:00:30 UTC
Did it happen just once? After the restart when IDE was updated? Or is it constant problem? What did you updated? Thanks for more info.
Comment 3 Vince Kraemer 2008-07-04 16:59:44 UTC
I have worked around this issue.

here is what I did to work-around the issue.

I looked in the logs and saw some other exceptions about 'class not found' from the SQE plugin.

I uninstalled those plugins.

I reinstalled the SQE plugins

Now, things are much happier.
Comment 4 Milan Kubec 2008-07-09 08:52:29 UTC
*** Issue 139298 has been marked as a duplicate of this issue. ***
Comment 5 Milan Kubec 2008-07-10 09:07:23 UTC
*** Issue 139503 has been marked as a duplicate of this issue. ***
Comment 6 alanbur 2008-07-15 12:16:05 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: SunOS, 5.11, x86

User Comments: 
Comment 7 alanbur 2008-07-15 12:16:16 UTC
Created attachment 64544 [details]
stacktrace
Comment 8 serb 2008-07-16 12:50:59 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Windows XP, 5.1, x86

User Comments: 
Comment 9 serb 2008-07-16 12:51:09 UTC
Created attachment 64697 [details]
stacktrace
Comment 10 Exceptions Reporter 2008-07-16 17:01:01 UTC
This issue has already 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=71746
Comment 11 Jesse Glick 2008-07-16 17:18:27 UTC
Looks like some kind of race condition. J2SESources tries to register the J2SEProject as an owner of the external root
but does not verify that the J2SEProject's constructor has actually completed first. However the use of postWriteRequest
is supposed to make this task run after the whole write-access block including ABPFS.loadProject has completed. I guess
that Mutex trickery is not working for some reason.

Possible solution: give up on helper2Project and make getProjectFor just be a convenience method to call PM.findProject
on the project directory specified by the helper. But I don't know what affect that would have on the stack trace
displayed here, which shows gPF being called within the dynamic scope of findProject; would it result in a recursive
call to findProject on the same dir?
Comment 12 Milan Kubec 2009-05-15 12:44:42 UTC
Last report is from 6.1, problem probably vanished with other changes.