'Retrieve clob data using apache camel
I am polling clob column using apache camel as below.
<route>
<from uri="timer://timer1?period=2m" />
<setBody>
<simple>
SELECT CLOB_COLUMN FROM TABLE WHERE STATUS=1
</simple>
</setBody>
<to uri="jdbc:dataSource?outputType=StreamList" />
<split streaming="true">
<simple>${body}</simple>
<setProperty name="myProperty">
<simple>${body[CLOB_COLUMN]}</simple>
</setProperty>
<to uri="direct:processing"/>
</split>
</route>
Body of processing route shows like oracle.sql.clob@123456. How can I convert that value to String format.
Camel 2.23 version used to give value as String format but after upgraded to 3.16, its giving clob value.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|