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: java.util.HashMap to the required type: java.io.InputStream
Date Thu, 11 Mar 2010 19:48:42 GMT
Hi

Just add a Processor after the JDBC endpoint where you grab the Map
body and put its value back as the body.

>           .to("jdbc:testdb?readSize=100")
--> insert processor here
>           .split(body())


On Thu, Mar 11, 2010 at 8:21 PM, schivukula
<srinivas.chivukula@state.ma.us> wrote:
>
> I have a requirement to get a value from the database and convert write
> individual values to file, the fileid is a string and filecontent is a
> oracle.sql.blob. I am getting the following error, please help I am new to
> camel
>
> from("timer://kickoff?period=30000")
>       .setBody(constant("select fileid,filecontent from ftsmailbox where
> display_status= 'SHOW' and mimetype = 'text/xml' and fileid = 7216"))
>           .to("jdbc:testdb?readSize=100")
>           .split(body())
>           .to("file:target/messages/others");
>
>
> Error
> Caused by: org.apache.camel.NoTypeConversionAvailableException: No type
> converter available to convert from type: java.util.HashMap to the required
> type: java.io.InputStream with value {FILECONTENT=oracle.sql.BLOB@16ea15f,
> FILEID=7216}
>        at
> org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:123)
>        at
> org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)
>
> --
> View this message in context: http://old.nabble.com/java.util.HashMap-to-the-required-type%3A-java.io.InputStream-tp27868505p27868505.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

Mime
View raw message