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.
Build: NetBeans IDE 6.5 (Build 200811100001) VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05, Java(TM) SE Runtime Environment, 1.6.0_03-b05 OS: Windows Vista, 6.0, x86 Stacktrace: java.lang.NullPointerException at org.netbeans.modules.java.api.common.SourceRoots$6.run(SourceRoots.java:334) at org.openide.util.Mutex.writeAccess(Mutex.java:469) at org.netbeans.modules.java.api.common.SourceRoots.putRoots(SourceRoots.java:321) at org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.storeRoots(WebProjectProperties.java:809) at org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.storeProperties(WebProjectProperties.java:560) at org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.access$200(WebProjectProperties.java:118)
Created attachment 76273 [details] stacktrace
I believe I have tracked down the problem that is causing the NPE. Sorry for the long-ish story, but it sets the background. I have a web project that pre-dates release 6.5. That project had no source files, it simply packaged a number of jars and configuration files. In NetBeans 6.5, if I try to make a change to the properties of that project, I get the NPE. I needed to make a change. I tried editing the project.xml file manually to get around the NPE issue and NetBeans 6.5 refused to open the project after any editing, including simply adding whitespace. The Open Project dialog would give me an error message about a problem in the XML. I eventually tracked it down to a missing mandatory <source-roots> element. When I added one manually, all the NetBeans problems went away. Apparently, that element was not mandatory (or the file was not validated) in earlier releases of NetBeans. So, I'm guessing that the NPE came as a result of the poor handling of a validation failure when trying to save a changed project.xml Hope this helps! Ralph
Not related to java.source (api.java.common != java.source), should be first investigated in Web Projects, IMO.
I tried to open project with missing <source-roots> element but IDE refuses it as invalid project.xml so in a way that prevents the NPE. :-) Yes, project.xml validation was added in recent releases because project.xml was not always valid against its XML schema. Considering there are no other duplicates of this exception I'm closing this as WORKSFORME. Do not hesitate to object if you disagree or still have the problem.