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 - NullPointerException at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.getProjectFor
Summary: NullPointerException at org.netbeans.modules.project.ant.AntBasedProjectFacto...
Status: RESOLVED WORKSFORME
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milan Kubec
URL: http://statistics.netbeans.org/except...
Keywords:
: 139298 139503 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-03 01:18 UTC by Vince Kraemer
Modified: 2009-05-15 12:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 71746


Attachments
stacktrace (1.98 KB, text/plain)
2008-07-03 01:19 UTC, Vince Kraemer
Details
stacktrace (1.97 KB, text/plain)
2008-07-15 12:16 UTC, alanbur
Details
stacktrace (1.97 KB, text/plain)
2008-07-16 12:51 UTC, serb
Details

Note You need to log in before you can comment on or make changes to this bug.
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.