Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 157361

Summary: .../src/java/jpa,valid=true is not inside .../src/java,valid=false
Product: java Reporter: mols <mols>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3 CC: alcmontejo, felixkirathe, gorrus, jglick, jtulach, MackSix, muellermi, veskojl
Version: 6.x   
Target Milestone: 7.1   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=145505
Whiteboard: EXCEPTIONS_REPORT
Issue Type: DEFECT Exception Report: 145505
Bug Depends on: 204271    
Bug Blocks:    
Attachments: stacktrace
stacktrace
stacktrace

Description mols 2009-01-23 14:02:13 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Windows XP, 5.1, x86

Stacktrace: 
java.lang.IllegalArgumentException: C:\Java Workspace\NileUStudio\UMSAdmissionApp\test\.svn is not inside C:\Java Workspace\NileUStudio\UMSAdmissionApp\test
        at org.netbeans.spi.project.support.ant.SourcesHelper$SourceRoot$Group.contains(SourcesHelper.java:180)
        at org.netbeans.spi.java.project.support.ui.TreeRootNode$GroupDataFilter.acceptFileObject(TreeRootNode.java:245)
        at org.openide.loaders.FolderChildren$1R.run(FolderChildren.java:157)
        at org.openide.util.Mutex$1Exec.run(Mutex.java:1239)
        at org.openide.nodes.Children$ProjectManagerDeadlockDetector.execute(Children.java:1796)
        at org.openide.util.Mutex.postRequest(Mutex.java:1245)
Comment 1 mols 2009-01-23 14:02:20 UTC
Created attachment 76182 [details]
stacktrace
Comment 2 Exceptions Reporter 2009-04-08 14:35:28 UTC
This issue has already 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=145505
Comment 3 Egor Ushakov 2009-04-09 20:29:21 UTC
Build: NetBeans IDE Dev (Build 200904070200)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.IllegalArgumentException: C:\Documents and Settings\Egor\My Documents\NetBeansProjects\DesktopApplication1\src\META-INF is not inside C:\Documents and Settings\Egor\My Documents\NetBeansProjects\DesktopApplication1\src
        at org.netbeans.spi.project.support.ant.SourcesHelper$SourceRoot$Group.contains(SourcesHelper.java:181)
        at org.netbeans.spi.java.project.support.ui.TreeRootNode$GroupDataFilter.acceptFileObject(TreeRootNode.java:246)
        at org.openide.loaders.FolderChildren$1R.run(FolderChildren.java:155)
        at org.openide.util.Mutex$1Exec.run(Mutex.java:1239)
        at org.openide.nodes.Children$ProjectManagerDeadlockDetector.execute(Children.java:1810)
        at org.openide.util.Mutex.postRequest(Mutex.java:1245)
Comment 4 Egor Ushakov 2009-04-09 20:29:30 UTC
Created attachment 79849 [details]
stacktrace
Comment 5 Milan Kubec 2009-04-13 21:48:56 UTC
*** Issue 156096 has been marked as a duplicate of this issue. ***
Comment 6 Milan Kubec 2009-05-13 12:50:29 UTC
*** Issue 158617 has been marked as a duplicate of this issue. ***
Comment 7 Milan Kubec 2009-10-08 08:56:58 UTC
*** Issue 174037 has been marked as a duplicate of this issue. ***
Comment 8 Milan Kubec 2009-11-02 11:10:10 UTC
*** Issue 175815 has been marked as a duplicate of this issue. ***
Comment 9 alcmontejo 2010-03-23 16:45:01 UTC
Created attachment 95621 [details]
stacktrace

occure upon creation of java web project on sample file jsfJpaCrud.
Comment 10 Jesse Glick 2010-04-02 20:33:23 UTC
Looks like FileUtil.getRelativePath is returning null for invalid reasons?
Comment 11 Jaroslav Tulach 2010-04-07 12:58:13 UTC
The report 357787 says:

MasterFileObject[/Users/allenmontejo/NetBeansProjects/JsfJpaCrud/src/java/jpa@73ca8fa4:137a76ce,valid=true] is not inside MasterFileObject[/Users/allenmontejo/NetBeansProjects/JsfJpaCrud/src/java@7867a787:447f292a,valid=false]

obviously a valid file object cannot be a child of a not valid file object. Fix 
org.netbeans.spi.project.support.ant.SourcesHelper$SourceRoot$Group.contains(SourcesHelper.java:198) to always use just valid file objects.
Comment 12 Jesse Glick 2010-04-08 01:52:19 UTC
Probably for TreeRootNode to check.
Comment 13 Tomas Zezula 2010-04-16 12:54:34 UTC
Fixed jet-main 78199517f170
Comment 14 Quality Engineering 2010-04-17 08:14:23 UTC
Integrated into 'main-golden', will be available in build *201004170515* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/78199517f170
User: Tomas Zezula <tzezula@netbeans.org>
Log: #157361:MasterFileObject[/Users/allenmontejo/NetBeansProjects/JsfJpaCrud/src/java/jpa@73ca8fa4:137a76ce,valid=true] is not inside MasterFileObject[/Users/allenmontejo/NetBeansProjects/JsfJpaCrud/src/java@7867a787:447f292a,valid=false]
Comment 15 Jesse Glick 2011-10-25 22:58:25 UTC
*** Bug 203189 has been marked as a duplicate of this bug. ***
Comment 16 Jesse Glick 2011-10-25 23:06:32 UTC
Not fixed; see more recent dupe. Seems like it is the _parent_ which is invalid, while the _child_ is valid, so checking fo.isValid() has no effect. Probably a masterfs bug at root.

Would be nice to just suppress the exception and return false from the standard impls (GenericSources.Group, SourcesHelper.SourceRoot). Not obvious whether this would be a compatible change; the interface method is documented to throw IllegalArgumentException, but surely no caller is relying on this.
Comment 17 Tomas Zezula 2011-10-26 08:49:53 UTC
Having the parent fo invalid while children are valid is quite strange.
Changing the sources impl to return false makes sense.
For now I can catch the IAE in the TreeRootNode and handle it as false.
Comment 18 Tomas Zezula 2011-10-26 12:48:08 UTC
Fixed jet-main fad23e53083c
Comment 19 Quality Engineering 2011-10-27 14:03:16 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/fad23e53083c
User: Tomas Zezula <tzezula@netbeans.org>
Log: #157361:.../src/java/jpa,valid=true is not inside .../src/java,valid=false
Comment 20 Jesse Glick 2011-11-08 20:41:09 UTC
*** Bug 204810 has been marked as a duplicate of this bug. ***
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo