[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Fw: ds and ClassCircularityError

Following up on this:
In the course of merging with the latest p2 code, upgrading to yesterday's I-build, and fixing bugs, this problem has gone away. I can't explain why. I didn't change the class structure of the classes involved.

susan
----- Forwarded by Susan Franklin McCourt/Beaverton/IBM on 11/11/2009 09:01 AM -----



          Susan Franklin McCourt

          11/05/2009 04:21 PM



To: equinox-dev@xxxxxxxxxxx
cc:
From: Susan Franklin McCourt/Beaverton/IBM@IBMUS
Subject: ds and ClassCircularityError

I've been wildly refactoring some p2 code in my workspace to play around with some alternate API.
In doing so, I've broken the SDK's service registration for the UI Policy.
It seems I've got some kind of class circularity going on, but it's not clear to me what the problem is.

The stack trace below appears as soon as the p2 UI bundle is started and tries to obtain the registered Policy object.
The service registration is trying to instantiate the class SDKPolicy.
That constructor is trying to instantiate another class, SDKRepositoryManipulator. The two are unrelated apart from one instantiating the other.

The stack trace indicates the problem is in the constructor of a superclass, RepositoryManipulator. The superclass lives in a different bundle, as does its superclass.
What kinds of things should I be looking for in the involved classes to figure this one out?

thanks for any pointers,
Susan

ENTRY org.eclipse.equinox.p2.ui.sdk 4 0 2009-11-05 16:03:21.062
!MESSAGE
!STACK 0
org.osgi.framework.ServiceException: Exception in org.eclipse.equinox.internal.ds.ServiceReg.getService()
at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:449)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:430)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:667)
at org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper.getService(ServiceHelper.java:29)
at org.eclipse.equinox.internal.p2.ui.ProvUIActivator.initializeProvisioningUI(ProvUIActivator.java:115)
at org.eclipse.equinox.internal.p2.ui.ProvUIActivator.start(ProvUIActivator.java:93)
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:353)
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.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
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:393)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:466)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
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.ui.internal.handlers.HandlerProxy.loadHandler(HandlerProxy.java:351)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:287)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:790)
at org.eclipse.ui.menus.CommandContributionItem.access$18(CommandContributionItem.java:776)
at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:766)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3917)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3510)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2404)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2368)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2220)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
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:367)
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:611)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566)
at org.eclipse.equinox.launcher.Main.run(Main.java:1363)
at org.eclipse.equinox.launcher.Main.main(Main.java:1339)
Caused by: org.osgi.service.component.ComponentException: Exception occurred while creating new instance of component Component[
name = org.eclipse.equinox.p2.ui.sdk
activate = activate
deactivate = deactivate
modified =
configuration-policy = optional
factory = null
autoenable = true
immediate = false
implementation = org.eclipse.equinox.internal.p2.ui.sdk.SDKPolicy
properties =
serviceFactory = false
serviceInterface = [org.eclipse.equinox.p2.ui.Policy]
references = null
located in bundle = org.eclipse.equinox.p2.ui.sdk_1.0.100.qualifier [96]
]
at org.eclipse.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:456)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.createInstance(ServiceComponentProp.java:255)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:316)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:560)
at org.eclipse.equinox.internal.ds.ServiceReg.getService(ServiceReg.java:52)
at org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:120)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:118)
... 68 more
Caused by: java.lang.ClassCircularityError: org/eclipse/equinox/p2/ui/RepositoryManipulator
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.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:454)
... 75 more

GIF image