You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by piryambada <ut...@gmail.com> on 2010/02/16 10:04:21 UTC

camel sql insertion is not working in osgi

Hi, 


I am trying to insert some values in one table using camel sql component in
felix osgi .
My routing is like this


<to uri="bean:parsingService?method=parse"/>
<process ref="bookingProcessor"></process>
 <when>
       			<simple>in.header.bookingList</simple>
       			<split>
       			<simple>in.body</simple>
      			<to uri="sql:insert into bookinglist(bookinglist_id,datetime)
values(#,#)"/> 
     			</split>
       	</when>

My split is returning list like this[1,2009-10-10 10:10:10] but after split
it is not executing sql component.
But if i m givinng  <to uri="sql:insert into
bookinglist(bookinglist_id,datetime) values(1,'2009-10-10 10:10:10')"/> like
this it is storing in db...
I also tried like  <to uri="sql:insert into
bookinglist(bookinglist_id,datetime) values(#,'#')"/>  but still it is not
working..,can anybody tell me where i m doing mistake..Plz reply soon..


Thanks 
Priyambada




-- 
View this message in context: http://old.nabble.com/camel-sql-insertion-is-not-working-in-osgi-tp27605294p27605294.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel sql insertion is not working in osgi

Posted by NagendraCorpus <ma...@gmail.com>.
Hi,

priyambada, me also facing same issue , if u get any solution please reply .

Thanks,
Nagendra.

Claus Ibsen-2 wrote:
> 
> Hi
> 
> Please read this page to better report issues at the user form
> http://camel.apache.org/support.html
> 
> And why dont you just use a POJO to access the database, that is much
> easier.
> For example using spring JDBC.
> 
> Because in your use case you need to bind multiple values to the SQL
> statement which is much easier from POJO.
> 
> Otherwise iBatis is also an excellent SQL mapper.
> http://camel.apache.org/ibatis
> 
> 
> On Tue, Feb 16, 2010 at 10:04 AM, piryambada <ut...@gmail.com>
> wrote:
>>
>> Hi,
>>
>>
>> I am trying to insert some values in one table using camel sql component
>> in
>> felix osgi .
>> My routing is like this
>>
>>
>> <to uri="bean:parsingService?method=parse"/>
>> <process ref="bookingProcessor"></process>
>>  <when>
>>                        <simple>in.header.bookingList</simple>
>>                        <split>
>>                        <simple>in.body</simple>
>>                        <to uri="sql:insert into
>> bookinglist(bookinglist_id,datetime)
>> values(#,#)"/>
>>                        </split>
>>        </when>
>>
>> My split is returning list like this[1,2009-10-10 10:10:10] but after
>> split
>> it is not executing sql component.
>> But if i m givinng  <to uri="sql:insert into
>> bookinglist(bookinglist_id,datetime) values(1,'2009-10-10 10:10:10')"/>
>> like
>> this it is storing in db...
>> I also tried like  <to uri="sql:insert into
>> bookinglist(bookinglist_id,datetime) values(#,'#')"/>  but still it is
>> not
>> working..,can anybody tell me where i m doing mistake..Plz reply soon..
>>
>>
>> Thanks
>> Priyambada
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/camel-sql-insertion-is-not-working-in-osgi-tp27605294p27605294.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/camel-sql-insertion-is-not-working-in-osgi-tp27605294p27634404.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel sql insertion is not working in osgi

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Please read this page to better report issues at the user form
http://camel.apache.org/support.html

And why dont you just use a POJO to access the database, that is much easier.
For example using spring JDBC.

Because in your use case you need to bind multiple values to the SQL
statement which is much easier from POJO.

Otherwise iBatis is also an excellent SQL mapper.
http://camel.apache.org/ibatis


On Tue, Feb 16, 2010 at 10:04 AM, piryambada <ut...@gmail.com> wrote:
>
> Hi,
>
>
> I am trying to insert some values in one table using camel sql component in
> felix osgi .
> My routing is like this
>
>
> <to uri="bean:parsingService?method=parse"/>
> <process ref="bookingProcessor"></process>
>  <when>
>                        <simple>in.header.bookingList</simple>
>                        <split>
>                        <simple>in.body</simple>
>                        <to uri="sql:insert into bookinglist(bookinglist_id,datetime)
> values(#,#)"/>
>                        </split>
>        </when>
>
> My split is returning list like this[1,2009-10-10 10:10:10] but after split
> it is not executing sql component.
> But if i m givinng  <to uri="sql:insert into
> bookinglist(bookinglist_id,datetime) values(1,'2009-10-10 10:10:10')"/> like
> this it is storing in db...
> I also tried like  <to uri="sql:insert into
> bookinglist(bookinglist_id,datetime) values(#,'#')"/>  but still it is not
> working..,can anybody tell me where i m doing mistake..Plz reply soon..
>
>
> Thanks
> Priyambada
>
>
>
>
> --
> View this message in context: http://old.nabble.com/camel-sql-insertion-is-not-working-in-osgi-tp27605294p27605294.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