Date: Fri, 13 Mar 2015 10:48:08 +0100
From: peter.hermsdorf@xxxxxxxxx
To: ecf-dev@xxxxxxxxxxx
Subject: Re: [ecf-dev] Problem using multiple services from single server
You are right, thanks for the hint. With the suggested runlevel
setup the services get imported actually and my testsuite is working
again!
But on startup i see the following exception (see below), which is
caused by accessing
org.eclipse.ecf.internal.osgi.services.remoteserviceadmin.Activator.context
before the Activator.start method was called.
But since the access comes from
AbstractTopologyManager.getRemoteServiceAdmin I don't really
understand why Activator was not yet called by the framework.
Also fiddling around with the start levels of
org.eclipse.ecf.osgi.services.remoteserviceadmin does not yield to a
result yet ... it's currently as autostart with level 4.
my current setup of startlevel for ecf is:
target {
"org.eclipse.ecf.ssl*3.4.0.v20150306-2024"
"org.eclipse.ecf*3.4.0.v20150306-2024" autostart
"org.eclipse.ecf.console"
"org.eclipse.ecf.discovery" autostart
"org.eclipse.ecf.osgi.services.distribution" autostart
startLevel=3
"org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy"
autostart
"org.eclipse.ecf.osgi.services.remoteserviceadmin" autostart
"org.eclipse.ecf.provider.remoteservice" autostart
"org.eclipse.ecf.provider" autostart
"org.eclipse.ecf.remoteservice" autostart
"org.eclipse.ecf.remoteservice.asyncproxy*1.0.0.v20140410-1838"
"org.eclipse.ecf.sharedobject"
"org.eclipse.ecf.identity.nl_de"
"org.eclipse.ecf.identity*3.4.0.v20150306-2024" autostart
"org.eclipse.osgi.services.remoteserviceadmin" autostart
}
where the default autostart level is at 4.
Thanks for your support!
java.lang.NullPointerException
at
org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:224)
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager.getRemoteServiceAdmin(AbstractTopologyManager.java:155)
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager.handleServiceModifying(AbstractTopologyManager.java:441)
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager.handleEvent(AbstractTopologyManager.java:397)
at
org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManagerImpl.event(BasicTopologyManagerImpl.java:119)
at
org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManagerComponent.event(BasicTopologyManagerComponent.java:57)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry$6.call(ServiceRegistry.java:1192)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyHookPrivileged(ServiceRegistry.java:1239)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyHooksPrivileged(ServiceRegistry.java:1222)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyEventListenerHooksPrivileged(ServiceRegistry.java:1189)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:806)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.setProperties(ServiceRegistrationImpl.java:171)
at
org.eclipse.equinox.internal.app.EclipseAppDescriptor.refreshProperties(EclipseAppDescriptor.java:124)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.refreshAppDescriptors(EclipseAppContainer.java:470)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.lock(EclipseAppContainer.java:520)
at
org.eclipse.equinox.internal.app.EclipseAppDescriptor.createAppHandle(EclipseAppDescriptor.java:190)
at
org.eclipse.equinox.internal.app.EclipseAppDescriptor.launchSpecific(EclipseAppDescriptor.java:90)
at
org.osgi.service.application.ApplicationDescriptor.launch(ApplicationDescriptor.java:311)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:260)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.start(EclipseAppContainer.java:104)
at
org.eclipse.equinox.internal.app.Activator.addingService(Activator.java:134)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:317)
at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
at
org.eclipse.equinox.internal.app.Activator.start(Activator.java:56)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at
org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
at
org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at
org.eclipse.core.internal.runtime.PlatformActivator.startAppContainer(PlatformActivator.java:44)
at
org.eclipse.core.internal.runtime.PlatformActivator.start(PlatformActivator.java:31)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at
org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
at
org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:632)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:607)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:568)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:165)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at
org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:493)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.createInstance(ServiceComponentProp.java:270)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:331)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at
org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473)
at
org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217)
at
org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
at
org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
at
org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
at java.lang.Thread.run(Thread.java:744)
Am 13.03.2015 um 09:25 schrieb Wim
Jongman:
Unfortunately, this is not a correct assumption. You
have to check the run configuration and see the start
order of the equinox.ds bundle. If this bundle starts at
2, it will cause your component bundles to also start
early. No matter what the sequence number is in ss.
You could try the following: Set the start order of
equinox.ds to 4 and the start order of ecf distribution to
3. This is done in the run configuration for development
time and in the product file configuration when you build
it.
Cheers,
Wim
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ecf-dev
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ecf-dev