camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smokemaker <>
Subject Catch NoSuchComponentException in org.apache.camel.impl.CompositeRegistry#lookup
Date Wed, 06 Mar 2013 08:18:23 GMT
Hi, all!

I use Camel 2.10.3 in ServiceMix 4.5.0
Could someone please explain how to use
I've got CamelContext, defined in bundle "A" and want to dynamically add to
it a registry for resolving components from bundle "B".
1. I get the context's registry:

		Registry registry = camelContext().getRegistry();
		if (registry instanceof
			registry =
2. create registry for current bundle:
		BlueprintContainerRegistry selfRegistry = new
3. add selfRegistry to context's CompositeRegistry:
		if (registry instanceof org.apache.camel.impl.CompositeRegistry) {
Now, what we have in composite registry:
1. OsgiServiceRegistry [for bundle A]
2. BlueprintContainerRegistry [for bundle A]
3. BlueprintContainerRegistry [for bundle B]

When trying to lookup component from bundle B I've got exception

CompositeRegistry#lookup just lookups iterating the rigistries it has. And
gets exception on the second one (BlueprintContainerRegistry [for bundle

1. Am I using CompositeRegistry not in proper way?
2. If not, may be it's a bug and must be placed into the issue tracker? To
fix it the exception must be caught in CompositeRegistry#lookup

Thanks a lot!

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message