Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- To: Tom Tromey <tromey@redhat.com>, Thomas Girard <thomas.g.girard@free.fr>, 432541@bugs.debian.org, Matthias Klose <doko@ubuntu.com>, debian-java@lists.debian.org, Andrew Overholt <overholt@redhat.com>
- Subject: Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- From: Andrew Haley <aph@redhat.com>
- Date: Wed, 05 Mar 2008 12:36:22 +0000
- Message-id: <[🔎] 47CE93C6.8020601@redhat.com>
- In-reply-to: <[🔎] 47CE82AC.3090407@redhat.com>
- References: <18204.38489.907130.426749@zebedee.pink> <471C9AC0.5010702@ubuntu.com> <20071023122456.GB11541@sd-7866.dedibox.fr> <1193516267.3964.30.camel@micmac> <20080126161243.GD25785@quadriga.konqueror.de> <20080215225038.GA8215@sd-7866.dedibox.fr> <[🔎] 20080301233542.GM22001@quadriga.konqueror.de> <[🔎] 47CA82F0.9000802@redhat.com> <[🔎] 20080302114436.GN22001@quadriga.konqueror.de> <[🔎] 47CA96FF.4050506@redhat.com> <[🔎] 20080302120831.GO22001@quadriga.konqueror.de> <[🔎] 47CD5E02.10305@redhat.com> <[🔎] 47CE82AC.3090407@redhat.com>
Andrew Haley wrote:
> Andrew Haley wrote:
>> OK, I've found it. The ClassNotFoundException is thrown from a security
>> check
>> in libgcj. We are calling Method m1 from method m0, and m1's class loader
>> is different from m0's class loader. We have to check that for every arg
>> in m1, the actual type is the same in both m1.loader and m0.loader.
>>
>> The method in question is
>> org.eclipse.core.runtime.Platform.getPlugin(String), which returns an
>> instance of org.eclipse.core.runtime.Plugin. It gets this
>> by calling org.eclipse.core.internal.plugins.PluginDescriptor.getPlugin().
>>
>> When we do the security check, we call Platform's class loader to ask it
>> to loadClass("org.eclipse.core.runtime.Plugin") and it throws a
>> ClassNotFoundException.
>
> OK, I've discovered some more. The class loader that's throwing the
> exception is a
> org.eclipse.osgi.framework.internal.core.BundleLoader, and
> it's being asked to find org.eclipse.core.runtime.Plugin. Now, this
> is where it gets really interesting.
>
> org.eclipse.core.runtime.Plugin is defined in
> eclipse/plugins/org.eclipse.core.runtime_3.3.100.v20070530.jar,
> along with a few other classes, including
> org.eclipse.core.runtime.IPluginDescriptor and
> org.eclipse.core.runtime.Platform.
>
> *but*
>
> IPluginDescriptor's class loader is not able to find
> org.eclipse.core.runtime.Plugin.
OK, and the *reason* for this is that IPluginDescriptor is loaded not
from eclipse/plugins/org.eclipse.core.runtime_3.3.100.v20070530.jar
but from eclipse/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316/runtime_registry_compatibility.jar
So, if you ask IPluginDescriptor's class loader to find Plugin it
throws a ClassNotFoundException.
The only files in runtime_registry_compatibility.jar are:
org/eclipse/core/internal/registry/BundleHelper.class
org/eclipse/core/internal/registry/ExtensionHandle.class
org/eclipse/core/internal/registry/ExtensionPointHandle.class
org/eclipse/core/internal/registry/RegistryCompatibilityHelper.class
org/eclipse/core/runtime/IExtension.class
org/eclipse/core/runtime/IExtensionPoint.class
org/eclipse/core/runtime/IPluginDescriptor.class
So, I think I now have enough to write a test case. Two class
loaders, one of which loads a subset of the other's classes. Call
an interface in the class defined by the subset class loader and
see what happens.
Andrew.
Reply to:
- References:
- Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- From: Michael Koch <konqueror@gmx.de>
- Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- From: Andrew Haley <aph@redhat.com>
- Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- From: Michael Koch <konqueror@gmx.de>
- Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- From: Andrew Haley <aph@redhat.com>
- Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- From: Michael Koch <konqueror@gmx.de>
- Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- From: Andrew Haley <aph@redhat.com>
- Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- From: Andrew Haley <aph@redhat.com>
- Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- Prev by Date: Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- Next by Date: Processing of java-common_0.28_i386.changes
- Previous by thread: Re: Bug#432541: eclipse-cdt FTBFS with gcj-4.2
- Next by thread: Introducing distro-{jre,jre-headless,jdk,jdk-builddep} packages
- Index(es):