You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by srinidandi <sh...@corpus.com> on 2010/02/08 14:11:02 UTC

need an example of camel sql + felix OSGi

Hi,

I am evaluating using camel, its components like sql, csv and Apache Felix
in one of my projects. Is there any example(s) that I can get for this
combination. Googled a lot but could not get any straight example.

Thanks
-- 
View this message in context: http://old.nabble.com/need-an-example-of-camel-sql-%2B-felix-OSGi-tp27499552p27499552.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: need an example of camel sql + felix OSGi

Posted by srinidandi <sh...@corpus.com>.
Hi,

Thanks for replying. While I am still looking at it, is there anything like
features:install camel-activemq to use activemq as a end point in camel
route? That way, it will avoid deploying activemq related dependencies
manually.

Thanks
    

Aleksey Masny wrote:
> 
> May be, you need add features URL and install feature camel-csv.
> Features include urls for all required jar's. 
> 
> karaf@root> features:addUrl
> mvn:org.apache.camel.karaf/features/2.1.0/xml/features
> karaf@root> features:install spring
> karaf@root> features:install spring-dm
> karaf@root> features:install camel-core
> karaf@root> features:install camel-spring
> karaf@root> features:install camel-osgi
> karaf@root> features:install camel-csv
> 
> See more info in section "Step 8 : Deploy the bundles" at 
> http://camel.apache.org/tutorial-osgi-camel-part1.html tutorial .
> 
> -- 
> Aleksey Masny
> Integration Solutions Architect
> 
> Blog: http://pilgr.name/
> Twitter: http://twitter.com/pilgr
> 
> 

-- 
View this message in context: http://old.nabble.com/need-an-example-of-camel-sql-%2B-felix-OSGi-tp27499552p27515560.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: need an example of camel sql + felix OSGi

Posted by Aleksey Masny <pr...@gmail.com>.
May be, you need add features URL and install feature camel-csv.
Features include urls for all required jar's. 

karaf@root> features:addUrl
mvn:org.apache.camel.karaf/features/2.1.0/xml/features
karaf@root> features:install spring
karaf@root> features:install spring-dm
karaf@root> features:install camel-core
karaf@root> features:install camel-spring
karaf@root> features:install camel-osgi
karaf@root> features:install camel-csv

See more info in section "Step 8 : Deploy the bundles" at 
http://camel.apache.org/tutorial-osgi-camel-part1.html tutorial .


srinidandi wrote:
> 
> Hi Claus,
> 
> Thanks very much for the reply.
> 
> I modified the tutorial-osgi-camel-part1 by adding csv camel data
> formatter inside a route and then try to deploy the service and camel
> bundles on Apache Felix Karaf 1.2.0.
> 
> I could get the service and camel bundles deployed after doing
> osgi:install of camel-csv-2.1.0.jar and org.apache.commons.csv jar (get a
> Active state on doing osgi:list) but at runtime get the following
> exception:
> 
> karaf@root> Exception in thread "SpringOsgiExtenderThread-4"
> org.apache.camel.Ru
> ntimeCamelException: java.lang.IllegalArgumentException: The class
> org.apache.ca
> mel.dataformat.csv.CsvDataFormat is not on the classpath! Cannot use the
> dataFor
> mat org.apache.camel.model.dataformat.CsvDataFormat@1154718
> 
> And the camel route is as below.
> 
> <route>
>         <!-- poll every 10 seconds -->
>         <from uri="file:///C:/tutorial-osgi-camel-part1?
> delete=true&amp;consumer.delay=10000" />
>         <unmarshal><csv /></unmarshal>
>         <to uri="bean:myCsvHandler?method=handleCsvData" />
> </route> 
> 
> Can you please help me on this?
> 
> Thanks 
> 
> 
> 
> Claus Ibsen-2 wrote:
>> 
>> On Mon, Feb 8, 2010 at 2:11 PM, srinidandi
>> <sh...@corpus.com> wrote:
>>>
>>> Hi,
>>>
>>> I am evaluating using camel, its components like sql, csv and Apache
>>> Felix
>>> in one of my projects. Is there any example(s) that I can get for this
>>> combination. Googled a lot but could not get any straight example.
>>>
>> 
>> There is a bigger osgi tutorial here
>> http://camel.apache.org/tutorial-osgi-camel-part1.html
>> And its in 2 parts so check out part 2 as well.
>> 
>> Maybe it can help you get on the right track.
>> 
>> 
>>> Thanks
>>> --
>>> View this message in context:
>>> http://old.nabble.com/need-an-example-of-camel-sql-%2B-felix-OSGi-tp27499552p27499552.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> 
>> -- 
>> Claus Ibsen
>> Apache Camel Committer
>> 
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/need-an-example-of-camel-sql-%2B-felix-OSGi-tp27499552p27513412.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: need an example of camel sql + felix OSGi

Posted by srinidandi <sh...@corpus.com>.
Hi Claus,

Thanks very much for the reply.

I modified the tutorial-osgi-camel-part1 by adding csv camel data formatter
inside a route and then try to deploy the service and camel bundles on
Apache Felix Karaf 1.2.0.

I could get the service and camel bundles deployed after doing osgi:install
of camel-csv-2.1.0.jar and org.apache.commons.csv jar (get a Active state on
doing osgi:list) but at runtime get the following exception:

karaf@root> Exception in thread "SpringOsgiExtenderThread-4"
org.apache.camel.Ru
ntimeCamelException: java.lang.IllegalArgumentException: The class
org.apache.ca
mel.dataformat.csv.CsvDataFormat is not on the classpath! Cannot use the
dataFor
mat org.apache.camel.model.dataformat.CsvDataFormat@1154718

And the camel route is as below.

<route>
        <!-- poll every 10 seconds -->
        <from uri="file:///C:/tutorial-osgi-camel-part1?
delete=true&amp;consumer.delay=10000" />
        <unmarshal><csv /></unmarshal>
        <to uri="bean:myCsvHandler?method=handleCsvData" />
</route> 

Can you please help me on this?

Thanks 



Claus Ibsen-2 wrote:
> 
> On Mon, Feb 8, 2010 at 2:11 PM, srinidandi
> <sh...@corpus.com> wrote:
>>
>> Hi,
>>
>> I am evaluating using camel, its components like sql, csv and Apache
>> Felix
>> in one of my projects. Is there any example(s) that I can get for this
>> combination. Googled a lot but could not get any straight example.
>>
> 
> There is a bigger osgi tutorial here
> http://camel.apache.org/tutorial-osgi-camel-part1.html
> And its in 2 parts so check out part 2 as well.
> 
> Maybe it can help you get on the right track.
> 
> 
>> Thanks
>> --
>> View this message in context:
>> http://old.nabble.com/need-an-example-of-camel-sql-%2B-felix-OSGi-tp27499552p27499552.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/need-an-example-of-camel-sql-%2B-felix-OSGi-tp27499552p27511314.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: need an example of camel sql + felix OSGi

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Feb 8, 2010 at 2:11 PM, srinidandi
<sh...@corpus.com> wrote:
>
> Hi,
>
> I am evaluating using camel, its components like sql, csv and Apache Felix
> in one of my projects. Is there any example(s) that I can get for this
> combination. Googled a lot but could not get any straight example.
>

There is a bigger osgi tutorial here
http://camel.apache.org/tutorial-osgi-camel-part1.html
And its in 2 parts so check out part 2 as well.

Maybe it can help you get on the right track.


> Thanks
> --
> View this message in context: http://old.nabble.com/need-an-example-of-camel-sql-%2B-felix-OSGi-tp27499552p27499552.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus