Community
Participate
Working Groups
I'm opening this bug, since I don't have an idea how to debug this issue. Please advice! java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.eclipse.core.internal.plugins.PluginDescriptor.getPlugin()Lorg/eclipse/core/runtime/Plugin;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/core/internal/plugins/PluginDescriptor, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for interface org/eclipse/core/runtime/IPluginDescriptor have different Class objects for the type org/eclipse/core/runtime/Plugin used in the signature at org.eclipse.core.internal.plugins.PluginRegistry.getPluginDescriptor(PluginRegistry.java:117) at org.eclipse.core.internal.plugins.PluginRegistry.getPluginDescriptor(PluginRegistry.java:104) at org.eclipse.core.runtime.Platform.getPlugin(Platform.java:761) at org.eclipse.core.internal.preferences.legacy.InitLegacyPreferences.init(InitLegacyPreferences.java:43) at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.applyRuntimeDefaults(PreferenceServiceRegistryHelper.java:146) at org.eclipse.core.internal.preferences.PreferencesService.applyRuntimeDefaults(PreferencesService.java:367) at org.eclipse.core.internal.preferences.DefaultPreferences.applyRuntimeDefaults(DefaultPreferences.java:163) at org.eclipse.core.internal.preferences.DefaultPreferences.loadDefaults(DefaultPreferences.java:236) at org.eclipse.core.internal.preferences.DefaultPreferences.load(DefaultPreferences.java:232) at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:307) at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:543) at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:669) at org.eclipse.core.internal.preferences.AbstractScope.getNode(AbstractScope.java:38) at org.eclipse.core.runtime.preferences.DefaultScope.getNode(DefaultScope.java:68) at org.eclipse.ui.preferences.ScopedPreferenceStore.getDefaultPreferences(ScopedPreferenceStore.java:250) at org.eclipse.ui.preferences.ScopedPreferenceStore.setDefault(ScopedPreferenceStore.java:638) at org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin.initializePreferences(TasksUiPlugin.java:821) at org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin.start(TasksUiPlugin.java:481) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:381) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:457) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:326)
This happens only when running Unit Tests. Running the same Eclipse instance in a usual way is OK.
Moving to Platform component, may be I'll get answer there.
It looks like you are using the very old (pre 3.0??) registry API, and the same class names from the old & new API are colliding. Your best bet is to move away from requiring org.eclipse.core.runtime.compatibility and just use the API in org.eclipse.equinox.registry instead. Or perhaps this is Mylyn - what version of Eclipse platform and Mylyn are you using?
Not much can be said without steps to reproduce. In addtion to what John suggested, the other possible source for a problem like this is if you added plugins directly into the build path (Properties -> Java build path -> Projects) bypassing bundle dependency mechanism. Please attach a sample that allows us to reproduce the problem.
(In reply to comment #3) > It looks like you are using the very old (pre 3.0??) registry API, and the same > class names from the old & new API are colliding. Your best bet is to move away > from requiring org.eclipse.core.runtime.compatibility and just use the API in > org.eclipse.equinox.registry instead. Or perhaps this is Mylyn - what version > of Eclipse platform and Mylyn are you using? I cannot move away from requiring org.eclipse.core.runtime.compatibility, since it is required by the Eclipse Unit test framework. This happens when I run Unit tests from the PDE builder. What do you need for re-production?
(In reply to comment #4) > Not much can be said without steps to reproduce. > > In addtion to what John suggested, the other possible source for a problem like > this is if you added plugins directly into the build path (Properties -> Java > build path -> Projects) bypassing bundle dependency mechanism. > > Please attach a sample that allows us to reproduce the problem. What kind of sample? I have a whole process (PDE headless) of building my feature, this happens while running unit tests from customTargets.xml. None of my features requires org.eclipse.core.runtime.compatibility, but it seems like it is required by at least these: org.eclipse.ant.optional.junit_3.2.200.jar org.eclipse.wst.xml.xpath.core_1.0.0.v200904240436.jar org.eclipse.datatools.oda.cshelp_1.1.1.v200907031118.jar
I'm moving this to critical since it's very critical for me to solve this issue. Any suggestions regarding how to find why this happens are very welcome.
Created attachment 152595 [details] List of plug-ins presenting while running unit test
*** This bug has been marked as a duplicate of bug 297769 ***