Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6359

NPE while getting service does not lead to failover to the next implementation in SCR

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • scr-2.1.20
    • None
    • None

    Description

      While getting a service being implemented by two different implementations, the first one (i.e. the one with a higher service ranking) throws a CNFE. SCR does not fall back to the second implementation in that case but instead fails to activate the depending component.

      The exception looks like this

       
      16.11.2020 19:00:06.412 *ERROR* [FelixLogListener] biz.netcentric.cq.tools.accesscontroltool.bundle FrameworkEvent ERROR (org.apache.felix.log.LogException: org.osgi.framework.ServiceException: Service factory exception: org/bouncycastle/operator/OperatorCreationException)
      org.apache.felix.log.LogException: org.osgi.framework.ServiceException: Service factory exception: org/bouncycastle/operator/OperatorCreationException
      	at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:353)
      	at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:248)
      	at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
      	at org.apache.felix.framework.Felix.getService(Felix.java:3954)
      	at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450)
      	at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:88) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.inject.field.FieldHandler$ReferenceMethodImpl.getServiceObject(FieldHandler.java:518) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2389) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.prebind(DependencyManager.java:1207) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1634) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1030) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:937) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:902) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:348)
      	at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:248)
      	at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
      	at org.apache.felix.framework.Felix.getService(Felix.java:3954)
      	at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450)
      	at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:88) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.inject.field.FieldHandler$ReferenceMethodImpl.getServiceObject(FieldHandler.java:518) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2389) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.prebind(DependencyManager.java:1207) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1634) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1030) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:937) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:902) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:348)
      	at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:248)
      	at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
      	at org.apache.felix.framework.Felix.getService(Felix.java:3954)
      	at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450)
      	at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:88) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.inject.field.FieldHandler$ReferenceMethodImpl.getServiceObject(FieldHandler.java:518) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2389) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.prebind(DependencyManager.java:1207) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1634) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1030) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:937) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:902) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:348)
      	at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:248)
      	at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
      	at org.apache.felix.framework.Felix.getService(Felix.java:3954)
      	at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450)
      	at org.osgi.util.tracker.ServiceTracker.addingService(ServiceTracker.java:416)
      	at org.apache.aries.jmx.whiteboard.Activator$MBeanTracker.addingService(Activator.java:101)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:871)
      	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
      	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3804)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:907) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:893) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:960) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:733) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1091) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1043) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3804)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:907) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:893) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:960) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:733) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1091) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1043) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3804)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:907) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:893) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:960) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:733) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1091) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1043) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3804)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:907) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:893) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:960) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:733) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:667) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:433) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:666) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:353) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:553) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:69) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:424) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [org.apache.felix.scr:2.1.20]
      	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488)
      	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:420)
      	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
      	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
      	at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
      	at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516)
      	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4817)
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:2336)
      	at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:5349)
      	at org.apache.felix.framework.Felix.refreshPackages(Felix.java:4516)
      	at org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:188)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: org.apache.felix.log.LogException: java.lang.NoClassDefFoundError: org/bouncycastle/operator/OperatorCreationException
      	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
      	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3138)
      	at java.base/java.lang.Class.getConstructors(Class.java:1944)
      	at org.apache.felix.scr.impl.inject.internal.ComponentConstructorImpl.<init>(ComponentConstructorImpl.java:97) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.inject.internal.ComponentMethodsImpl.initComponentMethods(ComponentMethodsImpl.java:110) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.initDependencyManagers(AbstractComponentManager.java:1009) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1027) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:937) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:902) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:348)
      	... 141 common frames omitted
      Caused by: java.lang.ClassNotFoundException: org.bouncycastle.operator.OperatorCreationException not found by biz.netcentric.cq.tools.accesscontroltool.bundle [560]
      	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1597)
      	at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
      	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1982)
      	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      	... 151 common frames omitted
      16.11.2020 19:00:06.414 *ERROR* [FelixFrameworkWiring] org.apache.aries.jmx.whiteboard.JmxWhiteboardSupport registerMBean: Cannot register MBean service null with MBean servers: Not an instanceof DynamicMBean or not MBean spec compliant standard MBean
      16.11.2020 19:00:06.413 *ERROR* [FelixLogListener] biz.netcentric.cq.tools.accesscontroltool.bundle FrameworkEvent ERROR (org.apache.felix.log.LogException: org.osgi.framework.ServiceException: Service factory returned null. (Component: biz.netcentric.cq.tools.actool.configreader.YamlConfigReader (3958)))
      org.apache.felix.log.LogException: org.osgi.framework.ServiceException: Service factory returned null. (Component: biz.netcentric.cq.tools.actool.configreader.YamlConfigReader (3958))
      	at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:381)
      	at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:248)
      	at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
      	at org.apache.felix.framework.Felix.getService(Felix.java:3954)
      	at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450)
      	at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:88) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.inject.field.FieldHandler$ReferenceMethodImpl.getServiceObject(FieldHandler.java:518) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2389) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.prebind(DependencyManager.java:1207) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1634) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1030) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:937) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:902) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:348)
      	at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:248)
      	at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
      	at org.apache.felix.framework.Felix.getService(Felix.java:3954)
      	at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450)
      	at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:88) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.inject.field.FieldHandler$ReferenceMethodImpl.getServiceObject(FieldHandler.java:518) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2389) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.prebind(DependencyManager.java:1207) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1634) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1030) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:937) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:902) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:348)
      	at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:248)
      	at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
      	at org.apache.felix.framework.Felix.getService(Felix.java:3954)
      	at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450)
      	at org.osgi.util.tracker.ServiceTracker.addingService(ServiceTracker.java:416)
      	at org.apache.aries.jmx.whiteboard.Activator$MBeanTracker.addingService(Activator.java:101)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:871)
      	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
      	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3804)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:907) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:893) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:960) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:733) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1091) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1043) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3804)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:907) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:893) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:960) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:733) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1091) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1043) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3804)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:907) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:893) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:960) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:733) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1091) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1043) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3804)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:907) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:893) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:960) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:733) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:667) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:433) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:666) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:353) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:553) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:69) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:424) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [org.apache.felix.scr:2.1.20]
      	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [org.apache.felix.scr:2.1.20]
      	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488)
      	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:420)
      	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
      	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
      	at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
      	at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516)
      	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4817)
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:2336)
      	at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:5349)
      	at org.apache.felix.framework.Felix.refreshPackages(Felix.java:4516)
      	at org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:188)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      

      IMHO SCR should log the exception while loading the first service, but should then transparently inject the 2nd service.
      I am not sure if this is in line with https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-bound.services though....

      Attachments

        Activity

          People

            Unassigned Unassigned
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: