camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Unable to insert body data into table using sql component
Date Thu, 04 May 2017 11:08:54 GMT
Try with java.util.Map.


On Thu, May 4, 2017 at 1:51 AM, darwinanirudh <darwinanirudh@gmail.com> wrote:
> Dear All,
>
>
> I need to insert the body values into table so i used sql component.
>
> Since the data in the body should be of map data type , i tried the
> following and i am getting the exception:
>
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
> route webproxyTest at: >>> ConvertBodyTo[java.util.map] <<< in route:
> Route(webproxyTest)[[From[kafka:localhost:9092?topic=Mediate... because of
> java.util.map
>
> Caused by: java.lang.ClassNotFoundException: java.util.map
>
>
>
>
> <from
> uri="kafka:localhost:9092?topic=MediatedCdr&amp;zookeeperHost=localhost&amp;zookeeperPort=2181&amp;serializerClass=kafka.serializer.StringEncoder&amp;autoOffsetReset=smallest&amp;groupId=default"
> />
>
>                         <doTry>
>                         <to ref="callEventRestService" />
>                         <log message="after first display" />
>                         <to uri="bean:Display?method=process" />
>                         <doCatch>
>
>
> <exception>org.apache.camel.component.http.HttpOperationFailedException</exception>
>                         <log message="inside catch 2" />
>
>                         <to uri="bean:Display?method=process" />
>
>
>                         </doCatch>
>
>                         </doTry>
>
>                         <convertBodyTo type="java.util.map"/>
>
>                         <to uri="bean:Display?method=process" />
>
>         <to uri="sql:{{sql.SusinsertQuery}}"/>
>
>                         <log message="after second display" />
>
>                         <log message="aftersecond route" />
>                 </route>
>
> Sql query:
>
> sql.SusinsertQuery=insert into error_details values (:#aNum,:#aNum,:#aNum)
>
>
> Body data is in the form bye.
>
> regards
> Darwin
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Unable-to-insert-body-data-into-table-using-sql-component-tp5798623.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message