| Summary: | Synthetic context class loader is not set as TCCL | ||
|---|---|---|---|
| Product: | [RT] Virgo | Reporter: | Glyn Normington <glyn.normington> |
| Component: | runtime | Assignee: | Glyn Normington <glyn.normington> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | dmitry, hsiliev, milesg78 |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 360965, 361635 | ||
Testcase add in kernel commit 6a939c6a2d403daebe9c25ab3f7e54e5203f9765. (In reply to comment #1) > Testcase add in kernel commit 6a939c6a2d403daebe9c25ab3f7e54e5203f9765. Do you think there is a connection with this bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=353897 (In reply to comment #2) > (In reply to comment #1) > > Testcase add in kernel commit 6a939c6a2d403daebe9c25ab3f7e54e5203f9765. > > Do you think there is a connection with this bug > https://bugs.eclipse.org/bugs/show_bug.cgi?id=353897 Yes! I should have mentioned that I was working on bug 353897 when I decided to check the behaviour in the non-web case and was surprised by what I found. Thanks for pointing this out. To be precise, this bug relates to the base function of thread context class loading in PARs and scoped plans. Even when this bug is fixed, I suspect web bundles in PARs and scoped plans will result in their own TCCLs and we'll still need to document that behaviour in bug 353897 (and/or fix it later in bug 353899). A workaround, which users may have simply slipped into, is to import all relevant exports in the bundles in the PAR or scoped plan, but this messes up any dependency design among the bundles of the PAR or scoped plan. Fixed in general, but there is still an issue with Spring DM powered bundles covered by bug 360965. The fix is contained in kernel commits b663e72ee8eb90162f92187aca9d48839dbbd7a6 and d020dfe48ec760b8fd20176711e6b45fa283ddfa. |
A new testcase SyntheticContextTCCLIntegrationTests consists of a PAR which invokes a static method ("run") in a bundle outside the PAR. The run method attempts to load a class of a package exported by a bundle in the PAR using the current thread context class loader (TCCL). This fails with a class load failure showing that the invoking bundle in the PAR is used to provide the TCCL rather than the synthetic context class loader. I tested this on master and on Virgo 2.1 and dm Server 1.0.3 and it fails in each of these environments. Possibly the function never worked, in which case I'm surprised users have not spotted this. Opening this bug to document the behaviour and investigate further.