I use Blueprint with Karaf rather than spring to setup my routes and
camelcontext. It has worked well so far although Karaf can be a bit of pain
sometimes. But have a look here for a simple example.
http://blog.nanthrax.net/2014/08/testing-utest-and-itest-apache-camel-blueprint-route/

On Fri, Mar 3, 2017 at 1:32 PM, Andreas Gies [via Camel] <
ml-node+s465427n5794741...@n5.nabble.com> wrote:

> Hi there,
>
>
> for what it's worth - we are using Camel in OSGi with a non-karaf
> container.
> However - we are not using Spring.
>
> First, our container is completely written in Scala and therefor we are
> using
> different config mechanisms. Secondly, we prefer a programmatic creation
> of our Camel Contexts in order to leverage the compiler telling us
> when we do something wrong.
>
> Our underlying framework is felix, but we also do have quite some
> infrastructure
> bundles to make everything work.
>
> For reference, you might want to look at
> https://github.com/woq-blended/blended
>
> https://github.com/woq-blended/blended/tree/master/blended.camel.utils
>
> https://github.com/woq-blended/blended/tree/master/
> blended.samples/blended.samples.camel
>
> Best regards
> Andreas
>
> On 03/03/17 13:21, Claus Ibsen wrote:
>
> > See the examples there is a spring-dm example that runs in Karaf.
> > https://github.com/apache/camel/tree/master/examples
> >
> > The spring-dm example is at
> > https://github.com/apache/camel/tree/master/examples/
> camel-example-spring-dm
> >
> > Running Camel with bare bone Felix is not really recommended /
> > supported. You need to use karaf based containers for that.
> >
> > If not you need mor manual coding / setup yourself which we do not
> > recommend / support.
> >
> >
> > On Fri, Mar 3, 2017 at 1:12 PM, kumar <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5794741&i=0>> wrote:
> >> Hi ,
> >>
> >> I am new to OSGI world.
> >>
> >> I spent lot of time (even days ) in searching/understanding
> camel-spring
> >> with osgi container. I didn't find a good article for begginer like me
> which
> >> works straightforward with some setup or github..etc.
> >>
> >> We are having camel-spring application running well. Now we want to
> move to
> >> OSGI bundle environment like Felix(Karaf ..also).
> >> We are doing some work on migration to OSGI, we are having severe
> issues we
> >> were able to solve couple of them ,but end up with having  below
> issues:
> >>
> >> 1. I dont know where to place camel-spring xml context and route  files
> >> (previuosly in classpath with NON-OSGi) .So its not loading context
> getting
> >> file not found .
> >>
> >> 2. if I put that as below , i know its may be a wrong way
> >>
> >> *ClassPathXmlApplicationContext appContext = new
> >> ClassPathXmlApplicationContext(
> >>          new String[] {"file:app-camel-spring.xml" });*
> >> *Exception:*
> >> org.springframework.beans.factory.parsing.
> BeanDefinitionParsingException:
> >> Configuration problem: Unable to locate Spring NamespaceHandler for XML
> >> schema namespace [http://camel.apache.org/schema/spring]
> >> Offending resource: URL [file:app-camel-spring.xml]
> >>
> >>          at
> >> org.springframework.beans.factory.parsing.
> FailFastProblemReporter.error(FailFastProblemReporter.java:70)
> >>          at
> >> org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
>
> >>          at
> >> org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
>
> >>          at
> >> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.
> error(BeanDefinitionParserDelegate.java:301)
> >>          at
> >> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.
> parseCustomElement(BeanDefinitionParserDelegate.java:1408)
> >>          at
> >> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.
> parseCustomElement(BeanDefinitionParserDelegate.java:1401)
> >>          at
> >> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentR
> eader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:172)
> >>          at
> >> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentR
> eader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:142)
>
> >>          at
> >> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentR
> eader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:94)
>
> >>          at
> >> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.
> registerBeanDefinitions(XmlBeanDefinitionReader.java:508)
> >>          at
> >> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.
> doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
> >>          at
> >> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.
> loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
> >>          at
> >> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.
> loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
> >>          at
> >> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.
> loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
> >>          at
> >> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.
> loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
> >>          at
> >> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.
> loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
> >>          at
> >> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.
> loadBeanDefinitions(AbstractBeanDefinitionReader.java:252)
> >>          at
> >> org.springframework.context.support.AbstractXmlApplicationContext.
> loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
> >>          at
> >> org.springframework.context.support.AbstractXmlApplicationContext.
> loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
> >>          at
> >> org.springframework.context.support.AbstractRefreshableApplication
> Context.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
>
> >>          at
> >> org.springframework.context.support.AbstractApplicationContext.
> obtainFreshBeanFactory(AbstractApplicationContext.java:613)
> >>          at
> >> org.springframework.context.support.AbstractApplicationContext.refresh(
> AbstractApplicationContext.java:514)
> >>          at
> >> org.springframework.context.support.ClassPathXmlApplicationContext
> .<init>(ClassPathXmlApplicationContext.java:139)
> >>          at
> >> org.springframework.context.support.ClassPathXmlApplicationContext
> .<init>(ClassPathXmlApplicationContext.java:93)
> >>          at
> >> com.tp.boot.ApplicationBootActivator.start(
> ApplicationBootActivator.java:54)
> >>          at
> >> org.apache.felix.framework.util.SecureAction.
> startActivator(SecureAction.java:697)
> >>          at 
> >> org.apache.felix.framework.Felix.activateBundle(Felix.java:2238)
>
> >>          at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
>
> >>          at
> >> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
> >>          at
> >> org.apache.felix.framework.FrameworkStartLevelImpl.run(
> FrameworkStartLevelImpl.java:308)
> >>          at java.lang.Thread.run(Unknown Source)
> >>
> >> Here is Camel-spring context file I am trying to load:
> >> app-camel-spring.xml
> >> <http://camel.465427.n5.nabble.com/file/n5794738/app-camel-spring.xml>
> >>
> >> Please someone can help me with simple example or point me in right
> >> direction , if it works for me I will put some efforts to have a simple
> demo
> >> example for beginners like me.
> >>
> >>
> >>
> >> Thanks,
> >> Kumar
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context: http://camel.465427.n5.nabble.
> com/Camel-with-OSGI-in-Felix-with-Spring-DSL-tp5794738.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Camel-with-OSGI-in-Felix-
> with-Spring-DSL-tp5794738p5794741.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-with-OSGI-in-Felix-with-Spring-DSL-tp5794738p5794748.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to