Bug 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
IllegalArgumentException: Attempt to remove nonexistent path C:\Program Files...
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Generic Infrastructure
7.1
All All
: P2 (vote)
: 7.1
Assigned To: Jesse Glick
issues@projects
EXCEPTIONS_REPORT
: ERGONOMICS
: 199590 201331 201710 203233 (view as bug list)
Depends on:
Blocks: 200500
  Show dependency treegraph
 
Reported: 2011-09-05 09:23 UTC by tim_sa
Modified: 2011-10-14 15:04 UTC (History)
16 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (1.67 KB, text/plain)
2011-09-05 09:23 UTC, tim_sa
Details
stacktrace (1.31 KB, text/plain)
2011-09-23 13:28 UTC, Jesse Glick
Details
stacktrace (1.93 KB, text/plain)
2011-10-07 07:07 UTC, stefan79
Details
stacktrace (1.93 KB, text/plain)
2011-10-09 08:53 UTC, dds.dhawal
Details
stacktrace (1.71 KB, text/plain)
2011-10-10 06:38 UTC, stefan79
Details
stacktrace (1.30 KB, text/plain)
2011-10-10 09:11 UTC, J Bachorik
Details
stacktrace (1.93 KB, text/plain)
2011-10-10 15:23 UTC, Petr Cyhelsky
Details
stacktrace (1.84 KB, text/plain)
2011-10-12 19:38 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tim_sa 2011-09-05 09:23:56 UTC
Build: NetBeans IDE Dev (Build 201109040600)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7

User Comments:
tim_sa: closed a project




Stacktrace: 
java.lang.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\sunrsasign.jar;C:\Program Files\Java\jdk1.7.0\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0\jre\classes;C:\Program Files\Java\jdk1.7.0\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0\jre\lib\ext\zipfs.jar
   at org.netbeans.api.java.classpath.GlobalPathRegistry.unregister(GlobalPathRegistry.java:241)
   at org.netbeans.modules.java.j2seproject.J2SEProject$ProjectOpenedHookImpl.projectClosed(J2SEProject.java:694)
   at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectClosed(ProjectOpenedHook.java:87)
   at org.netbeans.spi.project.ui.support.UILookupMergerSupport$OpenHookImpl.projectClosed(UILookupMergerSupport.java:207)
   at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectClosed(ProjectOpenedHook.java:87)
   at org.netbeans.modules.project.ui.OpenProjectList.notifyClosed(OpenProjectList.java:1139)
Comment 1 tim_sa 2011-09-05 09:23:59 UTC
Created attachment 110387 [details]
stacktrace
Comment 2 Jesse Glick 2011-09-23 13:28:20 UTC
Created attachment 111100 [details]
stacktrace

Opened an FX sample on Linux then closed it.
Comment 3 David Konecny 2011-09-25 22:09:09 UTC
*** Bug 201331 has been marked as a duplicate of this bug. ***
Comment 4 David Konecny 2011-09-25 22:09:17 UTC
*** Bug 199590 has been marked as a duplicate of this bug. ***
Comment 5 David Konecny 2011-09-25 22:09:31 UTC
*** Bug 201710 has been marked as a duplicate of this bug. ***
Comment 6 David Konecny 2011-09-25 22:20:32 UTC
I closed a few instances of this issue for different project types which I found as deplicate of this one. It does look like they all have the same cause. I evaluated web project and there does not seem to be anything wrong - the code has been this way for a while. I'm adding more diagnostics to GlobalPathRegistry.unregister: web-main#1f10c327be57
Comment 7 Quality Engineering 2011-09-26 14:24:40 UTC
Integrated into 'main-golden', will be available in build *201109260601* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1f10c327be57
User: David Konecny <dkonecny@netbeans.org>
Log: #201617 - added more diagnostics
Comment 8 Tomas Zezula 2011-09-29 07:08:51 UTC
From the last exception report it seems that either the CP was not registered in the GPR or someone else has removed it. I will add more logging keeps stack traces of register and unregister.
Comment 9 stefan79 2011-10-07 07:07:54 UTC
Created attachment 111627 [details]
stacktrace

Closed two projects after importing + my settings + restarting NB.
Comment 10 Exceptions Reporter 2011-10-07 07:08:07 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=180922
Comment 11 dds.dhawal 2011-10-09 08:53:10 UTC
Created attachment 111728 [details]
stacktrace

closing projects while initialization of projects on IDE startup
Comment 12 David Konecny 2011-10-09 21:25:01 UTC
The logging I added is not particularly helpful to identify the cause. In the http://statistics.netbeans.org/exceptions/exception.do?id=531746 case the path being removed is (classpath/boot):

C:\Program Files\JDK1.6\jre\lib\resources.jar
C:\Program Files\JDK1.6\jre\lib\rt.jar
C:\Program Files\JDK1.6\jre\lib\sunrsasign.jar
C:\Program Files\JDK1.6\jre\lib\jsse.jar
C:\Program Files\JDK1.6\jre\lib\jce.jar
C:\Program Files\JDK1.6\jre\lib\charsets.jar
C:\Program Files\JDK1.6\jre\lib\modules\jdk.boot.jar
C:\Program Files\JDK1.6\jre\classes
C:\Program Files\JDK1.6\jre\lib\ext\dnsns.jar
C:\Program Files\JDK1.6\jre\lib\ext\localedata.jar
C:\Program Files\JDK1.6\jre\lib\ext\sunjce_provider.jar

but one which is registered is (notice that first file is not present in classpath being removed):

C:\Program Files\NetBeans 6.9.1\ide\modules\ext\jaxb\api\jaxb-api.jar
C:\Program Files\JDK1.6\jre\lib\resources.jar
C:\Program Files\JDK1.6\jre\lib\rt.jar
C:\Program Files\JDK1.6\jre\lib\sunrsasign.jar
C:\Program Files\JDK1.6\jre\lib\jsse.jar
C:\Program Files\JDK1.6\jre\lib\jce.jar
C:\Program Files\JDK1.6\jre\lib\charsets.jar
C:\Program Files\JDK1.6\jre\lib\modules\jdk.boot.jar
C:\Program Files\JDK1.6\jre\classes
C:\Program Files\JDK1.6\jre\lib\ext\dnsns.jar
C:\Program Files\JDK1.6\jre\lib\ext\localedata.jar
C:\Program Files\JDK1.6\jre\lib\ext\sunjce_provider.jar

In the case of http://statistics.netbeans.org/exceptions/exception.do?id=532266 it looks like classpath/boot was already removed.

In both cases IDE.log shows that IDE was started with some set of module and later another set of modules was enabled. Perhaps that's the key to reproduce this problem?
Comment 13 stefan79 2011-10-10 06:38:13 UTC
Created attachment 111751 [details]
stacktrace

Startet NetBeans after a new installation and closed than my projects.
Comment 14 J Bachorik 2011-10-10 09:11:13 UTC
Created attachment 111757 [details]
stacktrace

1. Opened a J2SE project in clean installation
2. Ergonomics kicks in and enables Java SE support
3. Closed the project
Comment 15 Tomas Zezula 2011-10-10 14:35:59 UTC
Caused by fix of issue #200500 (http://hg.netbeans.org/main-golden/rev/d90c6e4868ea).
The following happens:
The org.netbeans.modules.ide.ergonomics.fod.FeatureProjectFactory$FeatureNonProject creates merged POH (UILookupMergerSupport.OpenHookImpl) for org.netbeans.modules.ide.ergonomics.fod.FeatureProjectFactory$FeatureNonProject$FeatureOpenHook which is the defaultInstance.

The UILookupMergerSupport.OpenHookImpl calls defaultInstance.projectOpened() on the FeatureOpenHook which activates the features, changes Lookup and adds POH of the real project to the old  lookup.

The UILookupMergerSupport.OpenHookImpl iterates over the old lookup which was extended by real project's POHs. But the real project's POH is also UILookupMergerSupport.OpenHookImpl as the J2SEProject also creates merged lookup.
As the real project POH is instanceof OpenHookImpl it's not executed.
Comment 16 Tomas Mysik 2011-10-10 14:48:12 UTC
*** Bug 192386 has been marked as a duplicate of this bug. ***
Comment 17 Tomas Mysik 2011-10-10 14:48:48 UTC
In PHP, we also have a problem with project opening/closing - OPH is called twice in a row, see issue #192386 if you are interested (might be already fixed, exception reports are from NB 7.1 Beta).

Anyway, I will mark it as a duplicate.
Comment 18 Tomas Zezula 2011-10-10 15:03:02 UTC
*** Bug 203233 has been marked as a duplicate of this bug. ***
Comment 19 Tomas Zezula 2011-10-10 15:06:18 UTC
The issue #203233 is also duplicate of this one.
The POH is not called and no CPs are registered in GPR (so the java
infrastructure does not know about the project) => no scan is started and the java waits for the initial scan.

The CoS debug, run, profile as well as Go To Type, Symbol and other Java features does not work
until you open the first java file and forces the scan.
Comment 20 Petr Cyhelsky 2011-10-10 15:23:13 UTC
Created attachment 111791 [details]
stacktrace

popped on closing of anagram game
Comment 21 Jiri Kovalsky 2011-10-12 19:38:31 UTC
Created attachment 111951 [details]
stacktrace

I had ReproduceNB Maven projects [1] opened and compiled. On the parent project called "Close Dependent Projects" and then "Close Project" on the remaining parent project generated this exception.

[1] http://netbeans.org/bugzilla/attachment.cgi?id=111943
Comment 22 Jesse Glick 2011-10-12 20:28:36 UTC
(In reply to comment #15)
> Caused by fix of issue #200500
> (http://hg.netbeans.org/main-golden/rev/d90c6e4868ea).

OK, I will back that out and look for a different fix.
Comment 23 Jesse Glick 2011-10-12 20:29:50 UTC
core-main #a1e1ee18d049
Comment 24 Quality Engineering 2011-10-14 15:04:12 UTC
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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo