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 Dev (Build 200801280931) VM: Java HotSpot(TM) Client VM, 10.0-b19 OS: Windows 2003, 5.2, x86 User comments: STACKTRACE: (first 10 lines) java.lang.IllegalArgumentException: C:\Data\Data\galileoim\src\java\messages.properties not in C:\Data\Data\galileoim\src\java at org.netbeans.api.java.classpath.ClassPath$Entry.includes(ClassPath.java:697) at org.netbeans.modules.java.source.parsing.SourceFileManager.list(SourceFileManager.java:91) at org.netbeans.modules.java.source.parsing.SourceFileManager.list(SourceFileManager.java:64) at org.netbeans.modules.java.source.parsing.ProxyFileManager.list(ProxyFileManager.java:141) at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2179) at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1817) at com.sun.tools.javac.code.Symbol.complete(Symbol.java:402) at com.sun.tools.javac.code.Symbol$PackageSymbol.members(Symbol.java:629) at com.sun.tools.javac.comp.Resolve.findType(Resolve.java:975) at com.sun.tools.javac.comp.Resolve.findIdent(Resolve.java:1004) My case: Product Version: NetBeans IDE 6.1 Beta (Build 200803050202) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Windows XP version 5.1 running on x86; Cp1250; pl_PL (nb) Userdir: C:\Documents and Settings\cezariusz.marek\.netbeans\6.1beta
Fixed in: 3a48f7ae0243
Reopening - reproduced in NetBeans IDE 6.1 (Build 200805300101) http://statistics.netbeans.org/exceptions/detail.do?id=137116
Probably file systems problem, the FileUtil.getRelativePath(r, file) returned null and both r and file are valid.
This should never happen. I am not even able to simulate it artificially. Please, if you have a reproducible test case, share it here.
As shown in: http://statistics.netbeans.org/exceptions/detail.do?id=138842 there are two instances of FileObjects for the same path, both are valid and they are not "equals". The debugging info was produced by this code: http://hg.netbeans.org/main/rev/f4b7c9046468 As noted above, there should not be two non-equals instances of FileObjects for the same path. Guessing from similar recent reports, this is random. So, you will likely need to add more logging. Feel free to use the place in TreePathHandle that I used for the debugging info.
*** Issue 153061 has been marked as a duplicate of this issue. ***
*** Issue 153471 has been marked as a duplicate of this issue. ***
Please add some logs to debug the problem. Thanks.
I added some logging but still I am not able to decipher how it could happen. Reproducible test case is highly welcome. http://hg.netbeans.org/core-main/rev/a6f27a831ada
FYI, before I got this exception I had refactored and renamed the file I was editing, and an error message (OK dlg, not exception) was shown then saying that the file I had refactored could not be found (the new path, not the old one). It could be that something is holding onto stale FileObjects after a refactoring that replaces them.
Created attachment 76054 [details] log file
In the attached log, you will see a bunch of FileNotFoundExceptions. The problem file was one called PaintAttributes. I started with an interface called PaintAttributes, and an implementation in the same package called PaintAttributesImpl. I decided the interface was not useful, deleted PaintAttributes (the interface), removed the "implements PaintAttributes" clause from the top of PaintAttributesImpl, then used Refactor > Rename to rename PaintAttributesImpl to PaintAttributes. You will see a FileNotFoundException for PaintAttributes in the log. After that you will see an error message logged, which may be connected: Adding a fold that is identical with another previously added fold from the same FoldManager is not allowed After that we get the java errors: SEVERE [org.openide.util.Exceptions] java.lang.IllegalArgumentException: TreePathHandle [H:\space\VectorEditor\Model\src\org\netbeans\vectormodel\api\paint\PaintAttributes.java] was not created from H:\space\VectorEditor\Model\src\org\netbeans\vectormodel\api\paint\PaintAttributes.java mine: id=25068876, valid=true, url=file:/H:/space/VectorEditor/Model/src/org/netbeans/vectormodel/api/paint/PaintAttributes.java remote: id=29566266, valid=true, url=file:/H:/space/VectorEditor/Model/src/org/netbeans/vectormodel/api/paint/PaintAttributes.java --------------------------------------------------- Reflection failed: org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory starting from org.netbeans.StandardModule$OneModuleClassLoader@11c2b67[org.netbeans.modules.java.source] with possible defining loaders [...] at org.netbeans.api.java.source.TreePathHandle$TreeDelegate.resolve(TreePathHandle.java:425) at org.netbeans.api.java.source.TreePathHandle.resolve(TreePathHandle.java:142)
I am afraid I can't reproduce this IllegalArgumentException following described scenario. There is a lot of FileNotFoundExceptions when you rename package. But if I delete PaintAttributes and then refactor PaintAttributesImpl, it doesn't thow any exception. I had to fix debugging messages in TreePathHandle because of ClassNotFoundException (446223312269). If you are able to reproduce it repeatedly, please, send me error massages from build after changeset 446223312269 is integrated. Also I would like to know which type of project you used and if is something unusual on your hardware. Thanks.
> I would like to know which type of project you used and if is something unusual on your hardware. Nb module project (in suite, not nbsrc). You have windows & java versions below. Hardware is AMD Phenom 64 quad core CPU, 4GB RAM, Nvidia GEForce 9500 graphics card NetBeans installed on 3 drive Windows NT stripe set; sources on 4x350Gb drive hardware RAID-0 (Areca). Don't know what else I could add here.
I found a case in which invalid FileObject is re-validated and it leads to existence of duplicate FileObject for the same path. I fixed it. Now it is not possible to get input/output stream of invalid FileObject. http://hg.netbeans.org/core-main/rev/67d88d1c5230
Integrated into 'main-golden', will be available in build *200902061401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/67d88d1c5230 User: Jiri Skrivanek <jskrivanek@netbeans.org> Log: #130998 - suppress getting input/output stream of invalid FileObject. I may lead to re-validation of this FileObject which is prohibited.
*** Issue 159828 has been marked as a duplicate of this issue. ***
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/167e21070a01 User: Jiri Skrivanek <jskrivanek@netbeans.org> Log: #130998 - Don't set lastModified when already invalidated. It prevents duplicate valid file objects because lastModified field is used in isValid method.