Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] ClassCircularityError

Hi Wim,

With the first line in the application...i.e.:

IContainer container = ContainerFactory.getDefault().createContainer("ecf.container.trivial");

and the current version of Equinox, unfortunately this ClassCircularityError seems possible. I've observed that it seems to result when the class that triggers the start of ECF (i.e. IContainer in this case), is also accessed by a call to the extension registry's createExecutableExtension(). I believe this is some issue with the extension registry itself, as I don't see any reason why the createExecutableExtension should result in these errors, but I haven't yet figured out exactly why the extension registry behaves like this, and whether it's appropriate/correct behavior for the extension registry.

If one accesses the IContainerManager via an OSGi service rather than the ContainerManager static access, ECF is started via the access to the IContainerManager class, and the extension registry createExecutableExtension calls on start don't result in ClassCircularityErrors.

I've updated the example (on HEAD and Release_3_0 streams) to use these two lines:
IContainerFactory factory = getContainerManager().getContainerFactory();
IContainer container = factory.createContainer("ecf.container.trivial");

This is a better pattern to access the container factory anyway (i.e. it's how the example should have been done originally), and will prevent any such problems with the extension registry.

Thanks,

Scott


Wim Jongman wrote:
Hi,

Does anybody have a clue why the trivial example throws a ClassCircularityError?

Regards,

Wim

[log;+0200 2009.06.20
00:06:32:245;INFO;org.eclipse.ecf;org.eclipse.core.runtime.Status[plugin=org.eclipse.equinox.registry;code=1;message=Plug-in
"org.eclipse.ecf.examples.provider.trivial" was unable to instantiate
class "org.eclipse.ecf.internal.examples.provider.trivial.container.TrivialContainerInstantiator".;severity4;exception=java.lang.ClassCircularityError:
org/eclipse/ecf/core/IContainer;children=[]]]
java.lang.ClassCircularityError: org/eclipse/ecf/core/IContainer
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
	at java.lang.Class.getConstructor0(Unknown Source)
	at java.lang.Class.newInstance0(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:170)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:874)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
	at org.eclipse.ecf.internal.core.ECFPlugin.addContainerFactoryExtensions(ECFPlugin.java:194)
	at org.eclipse.ecf.internal.core.ECFPlugin.setupContainerFactoryExtensionPoint(ECFPlugin.java:244)
	at org.eclipse.ecf.internal.core.ECFPlugin.start(ECFPlugin.java:332)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
	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:376)
	at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:449)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
	at java.lang.Class.getConstructor0(Unknown Source)
	at java.lang.Class.newInstance0(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:170)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:874)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:189)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
org.eclipse.ecf.core.ContainerCreateException: Container type
description with name=ecf.container.trivial not found.  This may
indicate that the desired provider is not available or not startable
within runtime.
	at org.eclipse.ecf.core.ContainerFactory.getDescriptionByNameWithException(ContainerFactory.java:260)
	at org.eclipse.ecf.core.ContainerFactory.createContainer(ContainerFactory.java:254)
	at org.eclipse.ecf.examples.provider.trivial.TrivialApplication.start(TrivialApplication.java:19)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev



Back to the top