Hi John, You might like to cast your eye over a camel example I made for myself a little while ago:
https://github.com/jtkb/cameltest It might help give you a few pointers in the right direction. I haven't used if for a while so it might not work 'out-of-the-box' but the code might help you. Kerry On 16/10/18 20:36, John F. Berry wrote: > I'd love to share my code.. just make sure to have your Alka-Seltzer ready :P > This is my original route using Java DSL to solve a small route issue. (I did > anonymize a few things in the code before sending it out to public view) > I've tried to "fortify" it with dependencies and configurations to try and > flip it over to something Karaf can make heads or tails of. > Thanks! > > > ________________________________ > From: Kerry <[email protected]> > To: [email protected] > Sent: Tuesday, October 16, 2018 3:03 PM > Subject: Re: Running Camel in a Karaf OSGi container > > > > Hi John, > Are you able to share any of your code or an example project? also are you > familiar already with OSGi or is it only Karaf that you are new to? > thanks > Kerry > > > On 16/10/18 19:54, John F. Berry wrote: > > New user to Karaf due to the fact that my development work in Apache Camel is > wanted by people to be installed on a Windows server and to be installed as a > service. This led me to the Karaf product. > I've asked the Camel users forum about migration steps, but now I think this > is more of a Karaf and/or maven deployment thing than a Camel issue. > I have developed a route in Camel using maven and hand writing > a Java DSL route (no Eclipse or other tool). I can run the > jar as a standalone execution fine from a command line. > I did create a OSGi service wrapper in karaf and did have a > window service instance installed. > I just cannot seem to get Karaf to "deploy" it (a.k.a. pick up > and run with it under that OSGi container that is running. > Sorry for the generalities, new to the open source community > and the idea that you need to be fully immersed in every > Apache offering (Camel, Maven, Felix, ServiceMix, Karaf, > etc.) to utilize any one of them :P I have felix and > blueprint dependencies in my POM.. but they been through many > different forms in an attempt to run it. It is a Java DSL > Camel archetype that has been built, but cannot seem to > generate supporting files for Karaf to recognize my little > creation. > Ideas? > Later I attempted to make an "empty" project with maven selecting > "org.apache.camel.archetypes:camel-archetype-blueprint", but I cannot even > get that base package to run (the small Hello World code) without java > blowing up. The one I built, compiled, ran, tested and "jar"ed was from the > "org.apache.camel.archetypes:camel-archetype-java" maven archetype skeleton. > I attempted to merge the two.. but no luck so far! > > Thanks!
