Description
When upgrading from karaf-4.0.7 to karaf-4.1.1 we are seeing several NPE exceptions in the log related to Activator handling BundleEvent.UNRESOLVED before BundleEvent.RESOLVED events are recieved. This results in a NPE in StoredWiringResolver.delete(...) since the wiring map doesn't contain the bundleId.
16:26:50,110 | ERROR | blisher@704deff2 | org.eclipse.osgi | FrameworkEvent ERROR - org.eclipse.osgi java.lang.NullPointerException at org.apache.karaf.features.extension.StoredWiringResolver.delete(StoredWiringResolver.java:110) [?:?] at org.apache.karaf.features.extension.Activator.bundleChanged(Activator.java:53) [?:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:903) [?:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [?:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [?:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [?:?] at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:156) [?:?] at org.eclipse.osgi.container.ModuleContainer.unresolve0(ModuleContainer.java:936) [?:?] at org.eclipse.osgi.container.ModuleContainer.unresolve(ModuleContainer.java:788) [?:?] at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:985) [?:?] at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1368) [?:?] at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1) [?:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?] at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]