Community
Participate
Working Groups
I get a ClassCircularityError during a call to IConfigurationElement#createExecutableExtension. The setup: (plt == plugin loader test) 3 plugins, plt.abstractmodel, plt.specificmodel, plt.ui. I have them loaded into a workspace I built using the binary plugin import tool. plt.abstractmodel plugin defines: * A public interface IPrintable which has no methods * An extension point "printable", implementors should implement IPrintable * A plugin class AbstractModelPlugin * The startup method that attempts to create executable extensions for all registered extensions of "printable" and System.out.println() the results plt.abstractmodel plugin requires: org.apache.xerces org.eclipse.core.resources plt.specificmodel plugin defines: * SpecificModelPrintable plt.specificmodel plugin requires: plt.abstractmodel plt.ui plugin defines: * DoItActionDelegate an IWorkbenchWindowActionDelegate * the run method performs: System.out.println(new UIPrintable()); * UIPrintable, a subclass of SpecificModelPrintable * An action set that displays DoItActionDelegate plt.ui plugin requires: plt.abstractmodel plt.specificmodel org.eclipse.ui Clicking the "Do It" action causes the error enclosed at the end of this bug report. Notice that the following are required to get this bug to appear: 1. The executable extension loading in AbstractModelPlugin#startup 2. UIPrintable must extend SpecificModelPrintable, not implement IPrintable Changing the order of the import statements does not effect the behaviour. Log: Tue Nov 13 17:26:10 CST 2001 2 org.eclipse.core.runtime 2 Problems occurred when invoking code from plug-in: org.eclipse.core.runtime. java.lang.ClassCircularityError: plt/abstractmodel/IPrintable at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java:106) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:652) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:632) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:79) at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:116) at org.eclipse.core.internal.plugins.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:96) at plt.abstractmodel.AbstractModelPlugin.startup(AbstractModelPlugin.java:19) at org.eclipse.core.internal.plugins.PluginDescriptor$1.run(PluginDescriptor.java:643) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:812) at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:655) at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:135) at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:52) at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java:130) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:652) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0(DelegatingURLClassLoader.java:646) at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClass(DelegatingURLClassLoader.java:60) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites(DelegatingURLClassLoader.java:387) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:660) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:632) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java:141) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:652) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0(DelegatingURLClassLoader.java:646) at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClass(DelegatingURLClassLoader.java:60) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites(DelegatingURLClassLoader.java:387) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:660) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:632) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java:106) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:652) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:632) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at plt.ui.DoItActionDelegate.run(DoItActionDelegate.java:11) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:453) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:54) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:635) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1365) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1167) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:729) at org.eclipse.ui.internal.Workbench.run(Workbench.java:712) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at SlimLauncher.main(SlimLauncher.java:14) Log: Tue Nov 13 17:26:10 CST 2001 1 org.eclipse.core.resources 4 Unhandled exception caught in event loop. Log: Tue Nov 13 17:26:10 CST 2001 4 org.eclipse.ui 0 Plugin plt.abstractmodel activation failed while loading class plt.abstractmodel.IPrintable org.eclipse.core.internal.boot.DelegatingLoaderException: org.eclipse.core.runtime.CoreException: Problems encountered starting up plug-in: plt.abstractmodel. at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:657) at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:135) at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:52) at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java:130) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:652) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0(DelegatingURLClassLoader.java:646) at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClass(DelegatingURLClassLoader.java:60) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites(DelegatingURLClassLoader.java:387) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:660) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:632) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java:141) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:652) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0(DelegatingURLClassLoader.java:646) at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClass(DelegatingURLClassLoader.java:60) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites(DelegatingURLClassLoader.java:387) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:660) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:632) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java:106) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:652) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:632) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at plt.ui.DoItActionDelegate.run(DoItActionDelegate.java:11) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:453) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:54) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:635) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1365) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1167) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:729) at org.eclipse.ui.internal.Workbench.run(Workbench.java:712) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at SlimLauncher.main(SlimLauncher.java:14)
Created attachment 118 [details] Test.zip - A zip of the three plugins described in this bug report
This is either a compiler error or a VM error. It is saying that IPrintable is its own superinterface. I don't have the know-how or tools to de-compile the attached class files to determine if they were compiled correctly. If the class file is correct, this could be a VM error? Please specify VM. Moving to JDT-Core so they can investigate if this is a compiler error...
Please investigate if offending file is actually a cycle scenario we would have let go through. This would though be surprising...
The disassembled IPrintable shows: public interface plt.abstractmodel.IPrintable extends java.lang.Object { } So the classfile looks perfectly fine. I am thinking rather of a classloader issue. Moving to Platform/Core.
*** Bug 6150 has been marked as a duplicate of this bug. ***
ClassCircularityError is a VM error. As far as I know it can't have anything to do with class loading...
It's very easy to reproduce using the steps in the following duplicate PR: http://dev.eclipse.org/bugs/show_bug.cgi?id=6150 I have reproduced using Sun JDK 1.4.0 Beta. Here is the pattern I observe: - plugin JDIDebugPlugin is being loaded - this causes an attempt to load DebugException - this causes activation of DebugPlugin - DebugPlugin.startup() does a createExecutableExtension - this attempts to load JavaLineBreakpoint in JDIDebugPlugin (which has not yet been initialized) - Supertype of JavaLineBreakpoint is Breakpoint in DebugPlugin (which is not fully initialized) I can see that this creates an interesting situation. A class is being loaded whose plugin has not been activated. Possibly, when the VM is trying to load JavaLineBreakpoint it chokes when trying to analyze the supertype structure, because the super types cannot be loaded (their classloaders have not yet been created). As a wild guess, it may interpret this failure to walk the supertype structure as a ClassCircularityError.
While trying to debug this with the Sun JDK 1.4 beta VM, I got a VM dump. It was at exactly the same point in the stack where ClassCircularityErrors were previously occurring. Attaching VM dump.
Created attachment 138 [details] JDK VM dump
Interesting find: running Jed's test case on J9 results in the same ClassCircularityError. It's not only a Sun JDK problem. ClassCircularityError occurs on: Sun JDK1.3, SunJDK1.4, latest J9 ClassCircularityError does not occur on: Sun JDK1.2, any IBM JRE. I've contacted JCL/J9 folk for more insight...
John Wiegand said in an email: There is another solution to the problem which is much more serious, and would require serious contemplation before considering. That solution would be to defer all Plugin.startup execution, until all implicit class loading is complete loading super classes and superinterfaces). This would require a process keyed lookaside table (or some such), and some tweaks to the implementation. This would change the ordering of evaluation of plugin.startup relative to static initializers. This may be worth exploring, but it is a drastic solution.
I discussed this with Peters Shipton and Burka and they helped track down the problem. Basically, we shouldn't be calling arbitrary code during class loads (our startup() methods). They aren't sure if this is a written or unwritten rule, but they think that breaking it will undoubtedly cause bogusness under any VM. The VM always unwinds the load stack before defining and intializing classes, which is why my attempts to reproduce the problem using simple URLClassLoaders failed. The fact that they interpret the multiple load attempts as a circularity error isn't strictly correct, but they're not sure if it's possible to improve this. They suspect that the Hursley VM is actually defining two of the same class in this case, which doesn't cause ClassCircularityError but can easily lead to other bogusness: a class whose clinit never gets run, a class whose clinit gets run twice, or class incompatibility errors if these two classes cross paths. They basically suggested the drastic solution suggested by JW... one stack per thread that holds deferred startup methods until the class load stack has unwound. Another alternative would be to maintain a startup thread, and have all plugin startup code run in that. Using another thread would thwart the circularity detection and allow the startup to happen, although the temporal relationship between class instantiation and plugin startup would be difficult to enforce. It would also leave us vulnerable to deadlock issues...
Proposed fix attached. This is based off of the 0508 code base.
Created attachment 783 [details] PluginClassLoader.java
Thanks, Jed. Merged and released.
There was a problem with the fix that caused plug-ins to be activated in a wrong order. Reopening.
*** Bug 26390 has been marked as a duplicate of this bug. ***
When will this issue be adressed and fixed? I suggest to make it a P1 bug because this bug blocks our development efforts.
Gunnar, we highly recommend you avoid using createExecutableExtension in your Plugin.startup method. This circularity problem is not likely to be addressed, as it is rooted in a fundamental design problem with our classloaders that we can't fix in a non-breaking way. Loading extensions in your startup method would also cause eager plugin loading, which should be avoided. We generally recommend deferring plugin loading until as late as possible (ie, not when your plugin starts).
Thanks, I will take care of it. According to the log file I'm sure that the ClassCircularityErrors I get are from JDT plugin. I reported that anyway some time ago.
There is a belief that this has been fixed in 3.0 with the new osgi based runtime.
The testcase for this defect has NOT been fixed by the new OSGi classloading model. This testcase causes the same thread to enter into ClassLoader#loadClass for the same class "plt.abstractmodel.IPrintable" on the same classloader object two times. AFAIK, this will always cause a ClassCircularityError. This situation arises becuase of the auto activation of plugins on first classload. The IPrintable class is loaded the first time by pushing the button "Just do It". This causes the plugin to be activated. In activating the plugin (same thread as the current classload) the startup method is accessing the extension registry to load another executable extension which extends IPrintable. This causes us to try and load IPrintable again in the same thread because we have not finished loading it yet further up the stack. I do not see a way around this issue.
Closing as remind since there is no way around this.
*** Bug 125920 has been marked as a duplicate of this bug. ***
Reopening to resolve as fixed!! ... We actually have a fix to this very old bug from the lazy-start work in bug 135885.
A fix has been released for 3.3 M4.
Woo hoo! Congrats to Tom on finding a fix for this seemingly intractable problem.
We are seeing this issue in 3.4. I have attached a small example which illustrates the behaviour. Is this the same issue reported here?
Created attachment 150224 [details] Demonstrates ClassCircularity in 3.4 To reproduce autostart BundleB. The activator of BundleB creates an instance of BundleA.AnInterface which results in the following behaviour: (1) Causes type ANInterface to be loaded in BundleA (2) Causes BundleA to be started (3) Extension points processed in BundleA reference ANInterface (4) Causes type ANInterface to be loaded in BundleA (which triggered this trace)
Resulting stack trace: osgi> STARTING BUNDLE A !SESSION 2009-10-22 11:45:55.452 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_13 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB Command-line arguments: -dev file:C:/Documents and Settings/jamesw/My Documents/Derek Nexus Workspace/.metadata/.plugins/org.eclipse.pde.core/Test/dev.properties -os win32 -ws win32 -arch x86 -console -consoleLog !ENTRY org.eclipse.osgi 4 0 2009-10-22 11:45:56.093 !MESSAGE An error occurred while automatically activating bundle BundleA (1). !STACK 0 org.osgi.framework.BundleException: Exception in bundlea.Activator.start() of bundle BundleA. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1028) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:427) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:33) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:441) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at bundleb.Activator.start(Activator.java:38) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:355) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1074) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:616) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:299) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:489) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:211) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:321) Caused by: org.eclipse.core.runtime.CoreException: Plug-in BundleB was unable to load class bundleb.ImplementingClass. at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:180) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:164) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:867) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51) at bundlea.Activator.start(Activator.java:43) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003) ... 45 more Caused by: java.lang.ClassCircularityError: bundlea/visible/ANInterface at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:313) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160) ... 52 more Root exception: org.eclipse.core.runtime.CoreException: Plug-in BundleB was unable to load class bundleb.ImplementingClass. at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:180) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:164) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:867) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51) at bundlea.Activator.start(Activator.java:43) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:427) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:33) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:441) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at bundleb.Activator.start(Activator.java:38) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:355) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1074) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:616) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:299) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:489) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:211) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:321) Caused by: java.lang.ClassCircularityError: bundlea/visible/ANInterface at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:313) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160) ... 52 more !ENTRY BundleB 4 0 2009-10-22 11:45:56.093 !MESSAGE !STACK 0 org.osgi.framework.BundleException: Exception in bundleb.Activator.start() of bundle BundleB. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1028) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:355) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1074) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:616) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:299) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:489) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:211) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:321) Caused by: java.lang.NoClassDefFoundError: bundlea/visible/ANInterface at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at bundleb.Activator.start(Activator.java:38) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003) ... 10 more Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle BundleA (1). at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:125) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:427) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:33) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:441) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 30 more Caused by: org.osgi.framework.BundleException: Exception in bundlea.Activator.start() of bundle BundleA. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1028) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111) ... 40 more Caused by: org.eclipse.core.runtime.CoreException: Plug-in BundleB was unable to load class bundleb.ImplementingClass. at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:180) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:164) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:867) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51) at bundlea.Activator.start(Activator.java:43) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003) ... 45 more Caused by: java.lang.ClassCircularityError: bundlea/visible/ANInterface at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:313) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160) ... 52 more Root exception: java.lang.NoClassDefFoundError: bundlea/visible/ANInterface at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at bundleb.Activator.start(Activator.java:38) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:355) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1074) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:616) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:299) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:489) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:211) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:321) Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle BundleA (1). at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:125) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:427) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:33) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:441) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 30 more Caused by: org.osgi.framework.BundleException: Exception in bundlea.Activator.start() of bundle BundleA. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1028) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111) ... 40 more Caused by: org.eclipse.core.runtime.CoreException: Plug-in BundleB was unable to load class bundleb.ImplementingClass. at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:180) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:164) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:867) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51) at bundlea.Activator.start(Activator.java:43) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003) ... 45 more Caused by: java.lang.ClassCircularityError: bundlea/visible/ANInterface at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:313) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160) ... 52 more !ENTRY org.eclipse.osgi 4 0 2009-10-22 11:45:56.108 !MESSAGE Bundle initial@reference:file:../../../BundleB/ [4] is not active.
This testcase is is similar to the others where ClassCircularityErrors were thrown. But the one difference is that you are eagerly activating your bundle. This appears to introduce a different set of circumstances that can result in the ClassCircularityErrors. The previous fix we introduced in bug 135885 was to delay the activation of lazy started bundles until after we have successfully defined the class. But since you are eagerly activating a bundle we have no chance to delay the activation of your bundle which reintroduces the issues with ClassCircularityErrors. I still think the best practice is to not create executable extensions during bundle activation to avoid these kinds of issues.
Thanks Thomas and I agree with your best practice tip. In the application that caused this problem the equivalent of BundleB was not activated lazily, this was done in the snippet as an easy way of demonstratng the issue. In your explanation of the fix for bug #135885 you indicated that the activation of a type referenced - in a yet to be started bundle - waits until after the type is resolved. In the attached snippet I would expect the behaviour to be as follows where BundleB creates an instance of the yet to be activated BundleA.AnInterface: (1) ANInterface to be loaded in BundleA (2) ANInterface resolved (3) BundleA to be started (3) Extension points processed in BundleA reference ANInterface (4) Causes ANInterface to be referenced which is already in class loader from (2) Is this not the case?
(In reply to comment #32) > Thanks Thomas and I agree with your best practice tip. In the application that > caused this problem the equivalent of BundleB was not activated lazily, this > was done in the snippet as an easy way of demonstratng the issue. In your > explanation of the fix for bug #135885 you indicated that the activation of a > type referenced - in a yet to be started bundle - waits until after the type is > resolved. In the attached snippet I would expect the behaviour to be as > follows where BundleB creates an instance of the yet to be activated > BundleA.AnInterface: > > (1) ANInterface to be loaded in BundleA > (2) ANInterface resolved > (3) BundleA to be started > (3) Extension points processed in BundleA reference ANInterface > (4) Causes ANInterface to be referenced which is already in class loader from > (2) > > Is this not the case? Yes, I think your analysis is correct. What seems to be key is that BundleB's class loader is the initiating class loader for ANInterface and the VM gives up if an initiating class loader is re-entered to load the same class name which it is already in the process of loading.