Thank you, Claus, It worked now, here is the relevant fragment:
itCamelContext = new OsgiDefaultCamelContext(bundleContext); itCamelContext.addComponent("http", new HttpComponent()); itCamelContext.setTracing(true); itCamelContext.setStreamCaching(true); itCamelContext.setName(this.getClass().getSimpleName()); itCamelContext.setClassResolver(new OsgiClassResolver(itCamelContext, bundleContext)); itCamelContext.setLanguageResolver(new OsgiLanguageResolver(bundleContext)); itCamelContext.setDataFormatResolver(new OsgiDataFormatResolver(bundleContext)); Language simple = itCamelContext.resolveLanguage("simple"); assertNotNull(simple); Best regards, Alex soto > On Jan 25, 2020, at 3:29 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > > You need to use OsgiCamelContext. > > And also for osgi then when you do all of this manually you are on your own. > Out of the box its only camel-blueprint that is supported that bootstrap > Camel. > > > On Fri, Jan 24, 2020 at 10:18 PM Alex Soto <alex.s...@envieta.com > <mailto:alex.s...@envieta.com>> wrote: >> >> Migrating to Camel 3.0.1 from (2.X), I have being going over the migration >> documentation here: >> https://github.com/apache/camel/blob/master/docs/user-manual/modules/ROOT/pages/camel-3-migration-guide.adoc >> >> <https://github.com/apache/camel/blob/master/docs/user-manual/modules/ROOT/pages/camel-3-migration-guide.adoc><https://github.com/apache/camel/blob/master/docs/user-manual/modules/ROOT/pages/camel-3-migration-guide.adoc >> >> <https://github.com/apache/camel/blob/master/docs/user-manual/modules/ROOT/pages/camel-3-migration-guide.adoc>>, >> but now my integration is failing with: >> >> org.apache.camel.NoSuchLanguageException: No language could be found for: >> simple >> at >> org.apache.camel.impl.engine.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:92) >> at >> org.apache.camel.impl.engine.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:68) >> at >> org.apache.camel.impl.engine.AbstractCamelContext.resolveLanguage(AbstractCamelContext.java:1635) >> >> This is a very simple code setting up a Camel context: >> >> itCamelContext = new DefaultCamelContext(); >> itCamelContext.addComponent("http", new HttpComponent()); >> itCamelContext.setTracing(true); >> itCamelContext.setStreamCaching(true); >> itCamelContext.setName(this.getClass().getSimpleName()); >> itCamelContext.setClassResolver(new >> OsgiClassResolver(itCamelContext, bundleContext)); >> Language simple = itCamelContext.resolveLanguage("simple"); >> assertNotNull(simple); >> >> >> Why would this happen? Isn’t the Simple language part of the core anymore? >> FYI: I am running as part of an OSGi environment (Karaf) >> >> Best regards, >> Alex soto >> >> >> >> > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com <http://davsclaus.com/> @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 > <https://www.manning.com/ibsen2>