Hello,
I am really impresed by the capabilities of Apache Camel.
I am creating a workflow with a similar route
<camel:setBody><camel:constant>1</camel:constant></camel:setBody>
<camel:to uri="sql:select * from rule where
ruleId = # order by
ruleId?dataSourceRef=myDataSource"/>
<camel:setHeader headerName="CamelFileName">
<camel:constant>out.txt</camel:constant>
</camel:setHeader>
<camel:to uri="file://target/data"/>
It works great until trying to save select result :(
because it is an arralist returned, it appears that Apache Camel does not
have any convert type :(
I tried also to use jaxb mashall or convertBodyto to convert it before into
a xml format, but without any success, so I don't know what to do with the
result without writing a pojo consumer !?
I spent multiple hours on Internet to search for tutorials or other apache
camel users encountering the same need behavior but no answer :(
Expert help on my question would be appreciate ;)
Really thx in advance
Regards
Louis
Caused by: org.apache.camel.InvalidPayloadException: No body available of
type: java.io.InputStream but has value: [{ruleId=1, syncDir=/essai/1}] of
type: java.util.ArrayList on: Message: [{ruleId=1, syncDir=/essai/1}].
Caused by: No type converter available to convert from type:
java.util.ArrayList to the required type: java.io.InputStream with value
[{ruleId=1, syncDir=/essai/1}] on the exchange: Exchange[Message:
[{ruleId=1, syncDir=/essai/1}]]
--
View this message in context:
http://www.nabble.com/How-to-save-a-select-result-from-camel-sql-componnent-to-xml-%28-No-type-converter-available-to-convert-from-type%3A-java.util.ArrayList-issue-%29-tp25927249p25927249.html
Sent from the Camel - Users mailing list archive at Nabble.com.