Hello, About 1 in 10 times when ServiceMix is started up (4.5.3 and 5.4.1), some Blueprint bundle is waiting indefinitely that a namespace becomes available, in "grace period". The last entry in the log for this bundle is the following :
2015-09-16 14:22:28,722 | INFO | rint Extender: 1 | | BlueprintContainerImpl | Bundle org.apache.karaf.shell.log is waiting for namespace handlers [http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0] But the namespace is visible in the OSGi registry in the Felix web console : [org.apache.aries.blueprint.NamespaceHandler] osgi.service.blueprint.namespace http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 Using Bundles org.apache.aries.blueprint (10) This looks like a race condition, when the namespace handler is registered at the same time that the Blueprint bundle is trying to retrieve it. Unfortunately, I have no way to consistently reproduce the problem. As a tentative workaround, I added the following line in class BlueprintContainerImpl : if (missing.size() > 0) { LOGGER.info("Bundle {} is waiting for namespace handlers {}", getBundle().getSymbolicName(), missingURIs); eventDispatcher.blueprintEvent(new BlueprintEvent(BlueprintEvent.GRACE_PERIOD, getBundle(), getExtenderBundle(), missing.toArray(new String[missing.size()]))); + schedule(); return; } It adds a small overhead, and it seems not to cause any harm. In a few weeks/months, it will be possible to tell whether this fixes the problem for good. Does anyone see any possible negative side-effects to this workaround ? Just in case someone encounters the same problem and is looking for clues... Regards, metatech -- View this message in context: http://aries.15396.n3.nabble.com/Infrequent-race-condition-causes-a-bundle-to-wait-indefinitely-for-a-namespace-tp4031346.html Sent from the Aries - User mailing list archive at Nabble.com.
