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.
After a bumpy start with the 3.4 Beta-1 build, I get a NullPointerException on every startup, at at org.netbeans.modules.java.JavaDataObject.files (JavaDataObject.java:212) when called from org.openide.loaders.DataNode.getDisplayName (DataNode.java:153) It's an improvement from the 58 exceptions in my first Beta-1 startup! :) Will attach the whole ide.log giving the full stack trace.
Created attachment 6170 [details] ide.log showing the NPE I'm reporting
Oh. It got lots worse. As soon as I opened a filesystem in my project, containing code -- I got the same exception. Repeatedly. In an infinite loop. I tried Alt-F4 to kill the ide, but that didn't get me out of the infinite loop. In the Windows Task Manager, I ended the process. Didn't work the first time (still infinite loop), but the IDE died the second time I tried it.
I tried switching to another project (project B) that I hadn't touched since before I upgraded [hm :)] to Beta-1. Got the same exception during the project switch, but no infinite loop. Switched to project C and got no exception, and was able to browse the .java nodes in the explorer filesystems tab, no problems. Switched back to project B and got the exception, but was able to browse the .java nodes and didn't end up in an infinite loop. Then switched back to project A and got the exception, and the filesystems tab was removed from Explorer! When I reopened Explorer using View -> Explorer, the filesystems tab reappeared -- along with the exception dialog, same exception. I can't think of any significant difference between the projects that would explain the different manifestations of this exception -- they all follow the standard form of projects at my company (several filesystems with source files, several mounted jars, and a couple of directories with XML documentation files). A possibly significant sidenote: I had installed RefactorIT beta (0.9.2) as a Netbeans module in my Q-build installation prior to installing the Beta-1 build. When I installed the Beta-1 build, I first ran the uninstaller for RefactorIT, then renamed my c:\netbeans directory, then unzipped the Beta-1 .zip file in its place, then started up. On the first startup, I got 58 exceptions (counting only the top-level ones reported in a dialog, not the wrapped ones), including this one. The full ide.log from that first startup is at http://www.hi.is/~gthb/nb-issues/ide.log (too large to attach, I thought), and I first described that mess on issue #24178.
Minor detail, in case it helps: in the infinite loop, each appearance of the dialog has a Next button, which displays the exact same stack trace (confirmed by diff). There are only these two stack traces (i.e. there isn't a second Next), but when I Alt-Tab out of the window to type into this issue form and then Alt-Tab back into Netbeans, a third stack trace (also identical) has appeared in the dialog (so the dialog initially has a Next button, when I click it it has a Previous and a Next button, and when I click Next again, it has only a Previous button -- the stack trace is the same in all cases). And when I click OK, I get the dialog directly again, hence the infinite loop.
Fixed in trunk.
This problems occurs if you have 'Ant Indirect Compilation' or 'Ant Script Compilation' as default compiler for Java Sources.
Thanks, that provides an OK workaround so that I don't have to backtrack to the last Q-build before Beta-1 (which I was about to do :)
Nope, sorry. I switched my default compiler to external, and didn't get it for a while, but now got it again, while browsing in the explorer in a filesystem containing .java source nodes. I will attach the ide.log ...
*** Issue 24597 has been marked as a duplicate of this issue. ***
Created attachment 6178 [details] Yet another ide.log, showing the NPE despite no ant compiler
I narrowed it down a bit: I tried deleting .nbattrs from the directory I had just opened in Explorer when the exception occurred, and starting Netbeans. The exception did not appear, everything was fine. I shut down Netbeans, restored the .nbattrs file in that directory, started up Netbeans again, and sure enough, the exception came up again. I'll attach the .nbattrs file here.
Created attachment 6179 [details] Exception appears if and only if this .nbattrs file is encountered
Oh, and in that .nbattrs file there is an <attr> element with name="NetBeansAttrDataObjectCompilerManager" ... which sounds like this object was overriding the default compiler setting of the project and IDE, reinstating the Indirect Ant Script compiler for this object ... so your analysis WAS correct, except that it's not just the default compiler that must be changed. Apparently any Java source object whose designated compiler is an ant compiler, will cause this. Ouch.
Confirmed by experiment: I commented out that one <attr> in the .nbattrs and restarted the IDE: all was fine. I'm taking the liberty of resolving this FIXED again (since I was the one who incorrectly reopened it)
*** Issue 24829 has been marked as a duplicate of this issue. ***
*** Issue 24936 has been marked as a duplicate of this issue. ***
VERIFIED
Resolved for 3.4.x or earlier, no new info since then -> closing.