Raymond Augé created ARIES-2028:
-----------------------------------

             Summary: if a service leaves too quickly the dsl can  NPE
                 Key: ARIES-2028
                 URL: https://issues.apache.org/jira/browse/ARIES-2028
             Project: Aries
          Issue Type: Bug
          Components: Component DSL
    Affects Versions: component-dsl-1.2.2
            Reporter: Raymond Augé


Example
{code}
[INFO] Bnd inferred -runee: JavaSE-1.8
! Found no fw implementation
13:32:35.816 [main] ERROR o.a.a.j.r.w.internal.Whiteboard - ServiceReference 
CachingServiceReference {
cachedProperties={osgi.jaxrs.application.select=null (cached), service.id=75, 
objectClass=[javax.ws.rs.core.Feature], osgi.jaxrs.name=aries.shiro.authc, 
osgi.jaxrs.extension.select=null (cached), service.ranking=null (cached), 
osgi.jaxrs.whiteboard.target=null (cached)}
serviceReference={javax.ws.rs.core.Feature}={service.id=75, 
osgi.jaxrs.extension=true, service.bundleid=3, service.scope=prototype, 
shiro.authc=true, osgi.jaxrs.name=aries.shiro.authc, 
service.pid=org.apache.aries.jax.rs.shiro.authentication}
} for extension produced error: {}
java.lang.NullPointerException: null
        at 
org.apache.aries.jax.rs.whiteboard.internal.Whiteboard.lambda$null$59(Whiteboard.java:938)
        at org.apache.aries.component.dsl.OSGi.lambda$null$64(OSGi.java:599)
        at org.apache.aries.component.dsl.OSGi.lambda$null$64(OSGi.java:602)
        at org.apache.aries.component.dsl.Publisher.apply(Publisher.java:28)
        at org.apache.aries.component.dsl.OSGi.lambda$null$75(OSGi.java:715)
        at org.apache.aries.component.dsl.OSGi.lambda$null$64(OSGi.java:602)
        at org.apache.aries.component.dsl.OSGi.lambda$null$64(OSGi.java:602)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$new$2(JustOSGiImpl.java:47)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$effects$65(OSGi.java:596)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$effects$65(OSGi.java:596)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$null$68(OSGi.java:674)
        at org.apache.aries.component.dsl.Publisher.apply(Publisher.java:28)
        at org.apache.aries.component.dsl.OSGi.lambda$null$75(OSGi.java:715)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$new$2(JustOSGiImpl.java:47)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at 
org.apache.aries.component.dsl.OSGi.lambda$recoverWith$76(OSGi.java:711)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$flatMap$69(OSGi.java:674)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$null$68(OSGi.java:674)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$new$2(JustOSGiImpl.java:47)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at 
org.apache.aries.component.dsl.internal.BundleContextOSGiImpl.lambda$new$0(BundleContextOSGiImpl.java:29)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$flatMap$69(OSGi.java:674)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at 
org.apache.aries.component.dsl.internal.ChangeContextOSGiImpl.lambda$new$0(ChangeContextOSGiImpl.java:31)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at 
org.apache.aries.component.dsl.OSGi.lambda$recoverWith$76(OSGi.java:711)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$effects$65(OSGi.java:596)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$effects$65(OSGi.java:596)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$effects$65(OSGi.java:596)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$effects$65(OSGi.java:596)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$null$68(OSGi.java:674)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$new$2(JustOSGiImpl.java:47)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$flatMap$69(OSGi.java:674)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$null$68(OSGi.java:674)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$new$2(JustOSGiImpl.java:47)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$flatMap$69(OSGi.java:674)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$null$68(OSGi.java:674)
        at 
org.apache.aries.jax.rs.whiteboard.internal.FilteredPublisher.publishIfMatched(FilteredPublisher.java:51)
        at 
org.apache.aries.jax.rs.whiteboard.internal.Registry.lambda$waitForService$1(Registry.java:66)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$flatMap$69(OSGi.java:674)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.lambda$create$0(OSGiImpl.java:39)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$null$68(OSGi.java:674)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$new$2(JustOSGiImpl.java:47)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$null$68(OSGi.java:674)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$new$2(JustOSGiImpl.java:47)
        at 
org.apache.aries.component.dsl.internal.OSGiImpl.run(OSGiImpl.java:50)
        at org.apache.aries.component.dsl.OSGi.lambda$null$68(OSGi.java:674)
        at org.apache.aries.component.dsl.Publisher.apply(Publisher.java:28)
        at org.apache.aries.component.dsl.OSGi.lambda$null$66(OSGi.java:663)
        at org.apache.aries.component.dsl.internal.Pad.publish(Pad.java:59)
        at 
org.apache.aries.component.dsl.internal.DistributeOSGiImpl.lambda$null$1(DistributeOSGiImpl.java:51)
        at org.apache.aries.component.dsl.OSGi.lambda$null$64(OSGi.java:602)
        at org.apache.aries.component.dsl.Publisher.apply(Publisher.java:28)
        at 
org.apache.aries.component.dsl.internal.HighestRankingOSGi.lambda$null$0(HighestRankingOSGi.java:86)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.cleanUp(JustOSGiImpl.java:67)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$null$1(JustOSGiImpl.java:57)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.OSGiResultImpl.close(OSGiResultImpl.java:36)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at org.apache.aries.component.dsl.OSGi.lambda$null$63(OSGi.java:613)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.ServiceReferenceOSGi$DefaultServiceTrackerCustomizer.removedService(ServiceReferenceOSGi.java:96)
        at 
org.apache.aries.component.dsl.internal.ServiceReferenceOSGi$DefaultServiceTrackerCustomizer.removedService(ServiceReferenceOSGi.java:56)
        at 
org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:969)
        at 
org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1)
        at 
org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
        at 
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:911)
        at 
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:120)
        at 
org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:957)
        at 
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
        at 
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
        at 
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:936)
        at 
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:873)
        at 
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:241)
        at 
org.apache.aries.component.dsl.internal.ServiceRegistrationOSGiImpl.lambda$getServiceRegistrationOSGiResult$3(ServiceRegistrationOSGiImpl.java:94)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.OSGiResultImpl.close(OSGiResultImpl.java:36)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.OSGiResultImpl.close(OSGiResultImpl.java:36)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.OnlyLastPublisher.lambda$publish$0(OnlyLastPublisher.java:63)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.cleanUp(JustOSGiImpl.java:67)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$null$1(JustOSGiImpl.java:57)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.OSGiResultImpl.close(OSGiResultImpl.java:36)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at org.apache.aries.component.dsl.OSGi.lambda$null$63(OSGi.java:613)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.cleanUp(JustOSGiImpl.java:67)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$null$1(JustOSGiImpl.java:57)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.OSGiResultImpl.close(OSGiResultImpl.java:36)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.EffectsOSGi.lambda$null$0(EffectsOSGi.java:46)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.OSGiResultImpl.close(OSGiResultImpl.java:36)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.OSGiResultImpl.close(OSGiResultImpl.java:36)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.cleanUp(JustOSGiImpl.java:67)
        at 
org.apache.aries.component.dsl.internal.JustOSGiImpl.lambda$null$1(JustOSGiImpl.java:57)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.OSGiResultImpl.close(OSGiResultImpl.java:36)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.OSGiResultImpl.close(OSGiResultImpl.java:36)
        at org.apache.aries.component.dsl.OSGiResult.run(OSGiResult.java:29)
        at 
org.apache.aries.component.dsl.internal.ServiceReferenceOSGi$DefaultServiceTrackerCustomizer.removedService(ServiceReferenceOSGi.java:96)
        at 
org.apache.aries.component.dsl.internal.ServiceReferenceOSGi$DefaultServiceTrackerCustomizer.removedService(ServiceReferenceOSGi.java:56)
        at 
org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:969)
        at 
org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1)
        at 
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:286)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
        at 
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
        at 
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:120)
        at 
org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:957)
        at 
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
        at 
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
        at 
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:936)
        at 
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:873)
        at 
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:141)
        at 
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:261)
        at 
org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:496)
        at 
org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:515)
        at 
org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1043)
        at test.ShiroTest.setupConfigs(ShiroTest.java:71)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38)
        at junit.framework.TestSuite.runTest(TestSuite.java:252)
        at junit.framework.TestSuite.run(TestSuite.java:247)
        at aQute.junit.Activator.test(Activator.java:356)
        at aQute.junit.Activator.automatic(Activator.java:266)
        at aQute.junit.Activator.run(Activator.java:187)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at aQute.launcher.Launcher.launch(Launcher.java:450)
        at aQute.launcher.Launcher.run(Launcher.java:179)
        at aQute.launcher.Launcher.main(Launcher.java:155)
        at 
aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:170)
        at 
aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:135)
        at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:52)
13:32:35.818 [CM Event Dispatcher (Fire ConfigurationEvent: 
pid=org.apache.aries.jax.rs.shiro.authentication)] ERROR 
o.a.a.j.r.w.internal.Whiteboard - Errored ServiceReference 
CachingServiceReference {
cachedProperties={osgi.jaxrs.application.select=null (cached), service.id=75, 
objectClass=[javax.ws.rs.core.Feature], osgi.jaxrs.name=aries.shiro.authc, 
osgi.jaxrs.extension.select=null (cached), service.ranking=null (cached), 
osgi.jaxrs.whiteboard.target=null (cached)}
serviceReference={javax.ws.rs.core.Feature}={service.id=75, 
osgi.jaxrs.extension=true, service.bundleid=3, service.scope=prototype, 
shiro.authc=true, osgi.jaxrs.name=aries.shiro.authc, 
service.pid=org.apache.aries.jax.rs.shiro.authentication}
} for extension left

{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to