Hi, I've seen this before too, but I never had the time to drill into it.
It generally works fine, but in 1 out of 50 cases, most of my bundles fail to start claiming that X component was not found. Route start levels are higher than camel-core and component bundles. And there's no Spring or Blueprint participating with their asynchronous context starting, hence all activations are done synchronously. So the race condition cannot be coming from there... How often do you see it? More frequently on some machines or OSes than others? Does it resolve OK if you restart the failed bundle after the rest of the system initializes? What is the start level of your route bundle? And camel-core's (default should be 50)? Can you enable DEBUG logging on package org.apache.camel.impl.osgi? That'll help us see the work of camel-core's Activator, who is in charge of listening for bundle activations and introspecting them to discover components, data formats, languages, etc. Regards, *Raúl Kripalani* Enterprise Architect, Open Source Integration specialist, Program Manager | Apache Camel Committer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Thu, May 30, 2013 at 3:11 PM, Smith-John <[email protected]> wrote: > Hi, > > I have a problem using camel (2.10.4) within a OSGi environment (equinox). > > Sometimes I'm getting errors like "No component found with scheme: cxf" (or > stream or jetty or...). > Of course the components are there. After removing for example > org.apache.camel.component.cxf from imports and adding it again to it I can > start it without problems. But sometime later the same errors appear. > > Is this something like a race condition problem? For the moment my > workaround is to increase the start level of my bundles that use the camel > components. But I'm not sure if this is a safe way to fix the problem. Is > there an other solution to fix the problem? > > I'm working with JavaDSL and start the camelContext in a activator like: > > public void start(BundleContext bundleContext) throws Exception { > OsgiServiceRegistry r = new > OsgiServiceRegistry(bundleContext); > DefaultCamelContext c = new > OsgiDefaultCamelContext(bundleContext, r); > c.addRoutes(new myRoute()); > c.start(); > > > Regards. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/No-component-found-with-scheme-XY-tp5733506.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
