Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Startup Problem when using OSGI DS in RCP
Startup Problem when using OSGI DS in RCP [message #646550] Mon, 27 December 2010 07:29
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 49
Registered: July 2009
Member
Hi,

I'm rewriting some plug-ins and want to make use of OSGI declarative
services within Eclipse RCP. It worked fine for most of my services but
the latest service made Eclipse crash on startup with the following
exceptions:

!ENTRY org.eclipse.equinox.ds 4 0 2010-12-27 08:03:01.968
!MESSAGE Exception occurred while creating new instance of component
Component[
name = org.eclipse.recommenders.examples.rcp.codecompletion
activate = activate
deactivate = deactivate
modified =
configuration-policy = optional
factory = null
autoenable = true
immediate = true
implementation =
org.eclipse.recommenders.examples.rcp.codecompletion.Simples tCompletionEngine
state = Unsatisfied
properties =
serviceFactory = false
serviceInterface =
[org.eclipse.recommenders.rcp.codecompletion.IIntelligentCom pletionEngine]
references = null
located in bundle =
org.eclipse.recommenders.examples.rcp.codecompletion_0.1.0.q ualifier [408]
]
!STACK 0
java.lang.NoClassDefFoundError:
org/eclipse/jdt/ui/text/java/IJavaCompletionProposal
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:23 89)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.creat eInstance(ServiceComponent.java:457)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.c reateInstance(ServiceComponentProp.java:264)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.b uild(ServiceComponentProp.java:325)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone nt(InstanceProcess.java:588)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone nts(InstanceProcess.java:196)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolve r.java:426)
at
org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SC RManager.java:221)
at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceLis tener.serviceChanged(FilteredServiceListener.java:104)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.d ispatchEvent(BundleContextImpl.java:933)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:227)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEv entSynchronous(ListenerQueue.java:149)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.pu blishServiceEventPrivileged(ServiceRegistry.java:756)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.pu blishServiceEvent(ServiceRegistry.java:711)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistratio nImpl.setProperties(ServiceRegistrationImpl.java:171)
at
org.eclipse.equinox.internal.app.EclipseAppDescriptor.refres hProperties(EclipseAppDescriptor.java:124)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.refresh AppDescriptors(EclipseAppContainer.java:470)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.unlock( EclipseAppContainer.java:540)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.setAppStat us(EclipseAppHandle.java:162)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.setInterna lResult(EclipseAppHandle.java:230)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:202)
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(EclipseS tarter.java:369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by:
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
An error occurred while automatically activating bundle
org.eclipse.jdt.ui (95).
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:121)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:453)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
at
org.eclipse.osgi.internal.loader.SingleSourcePackage.loadCla ss(SingleSourcePackage.java:33)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:466)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:23 89)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.creat eInstance(ServiceComponent.java:457)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.c reateInstance(ServiceComponentProp.java:264)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.b uild(ServiceComponentProp.java:325)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone nt(InstanceProcess.java:588)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone nts(InstanceProcess.java:196)
at
org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied (Resolver.java:441)
at
org.eclipse.equinox.internal.ds.Resolver.enableComponents(Re solver.java:213)
at
org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRMa nager.java:800)
at
org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatc h(SCRManager.java:767)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.ja va:89)
at
org.eclipse.equinox.internal.util.impl.tpt.threadpool.Execut or.run(Executor.java:70)
Caused by: org.osgi.framework.BundleException: Exception in
org.eclipse.jdt.internal.ui.JavaPlugin.start() of bundle org.eclipse.jdt.ui.
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:284)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:417)
at
org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger (BundleLoader.java:265)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:106)
... 25 more
Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:283)
at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:308)
at
org.eclipse.jface.resource.JFaceResources.getFontRegistry(JF aceResources.java:342)
at
org.eclipse.jdt.internal.ui.JavaPlugin.ensurePreferenceStore BackwardsCompatibility(JavaPlugin.java:443)
at org.eclipse.jdt.internal.ui.JavaPlugin.start(JavaPlugin.java :368)
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.s tartActivator(BundleContextImpl.java:774)
... 31 more




In FontRegistry.java:283 it checks
Display display = Display.getCurrent(); Assert.isNotNull(display);
which fails since no UI is up and then crashes Eclipse. Changing the
startup level didn't solve the problem.

Are there any ideas how to get around this startup problem or do I have
to get back to using Eclipse extension points?

Thanks for advice,
Marcel
Previous Topic:IBM WASCEv2.1
Next Topic:Cleaning temporary build files
Goto Forum:
  


Current Time: Fri Nov 28 04:45:32 GMT 2014

Powered by FUDForum. Page generated in 0.01911 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software