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.
To reproduce: set an external compiler as default, mount a CVS filesystem. Remove one of CVS-managed sources locally. Try to compile the file or its package. I remember that something was adjusted in NbClassPath when it was about to return a File from a FileObject although the file didn't exist in OS' filesystem. It seems that now toFile() returns null from such requests. The stacktrace is short, I'm puttin it right here: java.lang.NullPointerException at org.openide.compiler.ExternalCompiler$4.getFileName(ExternalCompiler.java:310) at org.openide.compiler.ExternalCompiler.getFileName(ExternalCompiler.java:362) at org.openide.compiler.ExternalCompilerGroup.start(ExternalCompilerGroup.java:228) at org.netbeans.modules.java.JExternalCompilerGroup.start(JExternalCompilerGroup.java:134) [catch] at org.netbeans.core.compiler.CompilationEngineImpl$CompilerThread$GroupCompiler.run(CompilationEngineImpl.java:257)
It seems that the old behavior was wrong: if the file was not checked out to disk, you would not want to include it in an external compiler command, as the command would not work. (Do you want to get an error from the compiler? Probably so; this would be a bigger change to the external compiler.) I believe the new behavior of NbClassPath.toFile is correct; ExternalCompiler should return "" as the java.io.File name in this case, and the compiler group will quietly skip that entry. I will prepare a fix this way.
Created attachment 1118 [details] Patch which fixes the openide side of it
I will adjust the JavaExternalCompiler(Group) implementation so it prints out some meaningful error message in this case. Ideally, the message will be from the exception thrown from FileObject.getInputStream() so - in case of vcs filesystem - the user get a clue about what she should do.
In the cast that NbClassPath.toFile() returns null, would it be possible to call fileobject.getInputStream() to obtain a specific message(s) from the VCS ?
Fixed in the trunk, will merge to release32 (after #11436 however). To Svata: yes, it would be better to try to get the input stream and check for messages that way. I will try to do this in the trunk version, not for 3.2 (too complicated, not important enough). openide/src/org/openide/compiler/Bundle.properties 1.13 openide/src/org/openide/compiler/ExternalCompiler.java 1.33
*** Issue 11375 has been marked as a duplicate of this issue. ***
Fixed in release32.
*** Issue 11530 has been marked as a duplicate of this issue. ***
Target milestone -> 3.2
Resolved for 3.4.x or earlier, no new info since then -> verified
Resolved for 3.4.x or earlier, no new info since then -> closing.