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.
Summary: | Set contextClassLoader on all threads to be systemClassLoader | ||
---|---|---|---|
Product: | platform | Reporter: | Jesse Glick <jglick> |
Component: | Module System | Assignee: | Jesse Glick <jglick> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | cliffwd, eakle, lkramolis, phrebejk, ttran |
Priority: | P2 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 17815, 23055, 23399, 24145, 27903 | ||
Attachments: |
Experimental test that changes in ContextClassLoader are not propagated to child threads - well I could check the sources...
Complete patch for sierra branch |
Description
Jesse Glick
2002-02-19 13:28:43 UTC
Should also check if this permits lib/ext/rmi-ext.jar to finally be deleted. Created attachment 4936 [details]
Experimental test that changes in ContextClassLoader are not propagated to child threads - well I could check the sources...
Bummer. Well then I could enumerate all threads, I suppose. Note that the Java API has an apparent design defect: you have to decide in advance what size array to make: http://developer.java.sun.com/developer/bugParade/bugs/4097747.html Probably needed for proper JAXP configuration. Implemented. committed * Up-To-Date 1.26 core/src/org/netbeans/core/modules/ModuleManager.java committed * Up-To-Date 1.16 core/test/unit/src/org/netbeans/core/modules/ModuleManagerTest.java committed * Up-To-Date 1.45 openide/src/org/openide/TopManager.java Libor, please try it out and either verify or reopen as appropriate. The unit test passes, and a simple manual test (trying to load from various modules using Thread.currentThread().getContextClassLoader() from within a Java class run via internal execution) also passes. Verified. I have tried to move JAXP/transform API to lib/ext and it correctly found Xalan's TransformFactory. Thanks. Thanks, marking VERIFIED then. *** Issue 23312 has been marked as a duplicate of this issue. *** *** Issue 23312 has been marked as a duplicate of this issue. *** Created attachment 6904 [details]
Complete patch for sierra branch
Committing to sierra as per diff above: Checking in core/src/org/netbeans/core/modules/ModuleManager.java; /cvs/core/src/org/netbeans/core/modules/ModuleManager.java,v <-- ModuleManager.java new revision: 1.17.20.1; previous revision: 1.17 done Checking in core/test/unit/src/org/netbeans/core/modules/ModuleManagerTest.java; /cvs/core/test/unit/src/org/netbeans/core/modules/ModuleManagerTest.java,v <-- ModuleManagerTest.java new revision: 1.10.32.1; previous revision: 1.10 done Checking in openide/openide-spec-vers.properties; /cvs/openide/openide-spec-vers.properties,v <-- openide-spec-vers.properties new revision: 1.38.8.2.4.1.6.1; previous revision: 1.38.8.2.4.1 done Details: Pretty much straight merge from trunk (3.4 dev) version, with trivial syntax corrections to merge from ModuleManagerTest.java, and updating API spec version so Sierra modules needing this patch can be sure to depend on IDE/1 > 1.43.3.1 ensuring they will load in Sierra or 3.4 but be rejected in Orion (1.43.3). The unit test passes with the ModuleManager.java patch (and fails without it, as expected). An ad-hoc test also passes: System.out.println(Thread.currentThread().getContextClassLoader().loadClass("org.netbeans.modules.java.JavaDataObject")); (internal execution) prints the Class object, rather than throwing ClassNotFoundException. I did not file an integration request for this, sorry - not on SWAN and apparently not able to log into INF over Sun.Net. Someone else (Trung, Petr Hr., Cliff, etc.) is welcome to file a pre-closed INF for this. Resolved for 3.4.x or earlier, no new info since then -> closing. This issue had *2 votes* before move to platform component |