Apache Aries SPI Fly NPE

During testing on a Karaf test installation, when going through the logs, I found a NPE during “OSGi startup” that looks like a bug in SPI Fly:

2025-12-05 05:15:05.670 [DEBUG] [rg.apache.aries.spifly.BaseActivator] - Could not load provider org.apache.aries.jax.rs.whiteboard.internal.client.ClientBuilderImpl of service javax.ws.rs.client.ClientBuilder
java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null
	at java.util.HashMap.putMapEntries(HashMap.java:503) ~[?:?]
	at java.util.HashMap.putAll(HashMap.java:791) ~[?:?]
	at org.apache.aries.spifly.BaseActivator.lambda$registerProviderBundle$3(BaseActivator.java:271) ~[bundleFile:1.3.7]
	at java.util.TreeMap.callRemappingFunctionWithCheck(TreeMap.java:792) ~[?:?]
	at java.util.TreeMap.remapValue(TreeMap.java:868) ~[?:?]
	at java.util.TreeMap.compute(TreeMap.java:719) ~[?:?]
	at java.util.Collections$SynchronizedMap.compute(Collections.java:2990) ~[?:?]
	at org.apache.aries.spifly.BaseActivator.registerProviderBundle(BaseActivator.java:264) ~[bundleFile:1.3.7]
	at org.apache.aries.spifly.ProviderBundleTrackerCustomizer.addingBundle(ProviderBundleTrackerCustomizer.java:173) [bundleFile:1.3.7]
	at org.apache.aries.spifly.ProviderBundleTrackerCustomizer.addingBundle(ProviderBundleTrackerCustomizer.java:64) [bundleFile:1.3.7]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475) [osgi.core-8.0.0.jar:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:420) [osgi.core-8.0.0.jar:?]
	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [osgi.core-8.0.0.jar:?]
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [osgi.core-8.0.0.jar:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450) [osgi.core-8.0.0.jar:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:949) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:229) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:138) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:130) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:217) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.Module.publishEvent(Module.java:499) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.Module.doStart(Module.java:602) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.Module.start(Module.java:468) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1667) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.18.0.jar:?]

I can’t really tell whether this has consequences for OH or not, but I would think that something isn’t working as a consequence.

Posting it here probably isn’t very useful, except in the off chance that somebody knows what’s causing this, but Apache have made registering for a Jira discouraging enough that I’m not going to do that just so it can stay around untouched for years or be autoclosed for inactivity after a while.

This way, it at least “exists out there” and can be found when searching.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.