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.
Perhaps in project lookup twice as a result of a bad lookup merger? Potentially inefficient.
core-main #d90c6e4868ea has a temporary solution, but there is a deeper underlying problem in how LookupMerger works.
A safer workaround would be to avoid nesting cCL to begin with: diff --git a/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java b/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java --- a/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java +++ b/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java @@ -871,7 +871,7 @@ } if (!newPackaging.equals(packaging)) { packaging = newPackaging; - setLookups(LookupProviderSupport.createCompositeLookup(lookup, "Projects/org-netbeans-modules-maven/" + packaging + "/Lookup")); + setLookups(lookup, Lookups.forPath("Projects/org-netbeans-modules-maven/" + packaging + "/Lookup")); } } but this causes a test failure for unknown reasons: junit.framework.AssertionFailedError: null expected:<[base[, jar]]> but was:<[base[]]> at org.netbeans.modules.maven.NbMavenProjectImplTest.assertLookupObject(NbMavenProjectImplTest.java:95) at org.netbeans.modules.maven.NbMavenProjectImplTest.testPackagingTypeSpecificLookup(NbMavenProjectImplTest.java:77)
Created attachment 109823 [details] Functional workaround, but requires an API change The simple patch does not work because DelegatingLookupImpl checks only the providerLookup, not baseLookup, for LookupProvider's and MetaLookupMerger's. Alternate API change would be to allow the caller to pass an arbitrary providerLookup (rather than just a SFS path), though in this case it must be clearly documented what items are allowed in each lookup: only LP and MLM in pL, none of those in bL. It might also work to supply DLI with a single lookup, whereby providerResult and metaMergers are retrieved as now (deleting isAllJustLookupProviders), and baseLookup is computed using Lookups.exclude.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/d90c6e4868ea User: Jesse Glick <jglick@netbeans.org> Log: Temporary solution for #200500 (project open hook run twice).
Had to back out fix.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/a1e1ee18d049 User: Jesse Glick <jglick@netbeans.org> Log: #201617: IllegalArgumentException: Attempt to remove nonexistent path C:\Program Files\Java\jdk1.7.0\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0\jre\lib\s Backing out fix of bug #200500 which seems to have introduced regressions.
*** This bug has been marked as a duplicate of bug 224137 ***