[ 
https://issues.apache.org/jira/browse/CAMEL-6231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13620611#comment-13620611
 ] 

Willem Jiang commented on CAMEL-6231:
-------------------------------------

Hi,

I just checked the code, and did some basic tests. It looks like Camel should 
be able handle the payload of file out of box. I'm not sure if there is 
something wrong with the Charset setting. Can you check the camel error log for 
more information?

Willem
                
> Camel Split doesn't processes the payload of the file, received via FTP
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-6231
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6231
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.10.4
>            Reporter: Igor Ivaniuk
>
> I'm having troubles trying to create a route that splits files received from 
> FTP.
> Here is the configuration (in Spring DSL):
> {noformat}
> <camelContext id="receiveFTP" trace="true" 
> xmlns="http://camel.apache.org/schema/spring"; >
>       <threadPoolProfile id="receiveFTP-splitter-profile"
>                            defaultProfile="false" poolSize="20"
>                            maxPoolSize="30"/>
>       <!-- Endpoints -->
>       <endpoint id="FileOutput" 
> uri="file:D:/Temp/camel-test/ftpReceive/?fileName=Received_${exchangeId}_${file:onlyname}"
>  />
>       <endpoint id="FTPSource" 
> uri="ftp://192.168.21.11:21/folder/?pollStrategy=#ftpPollStrategy&amp;throwExceptionOnConnectFailed=true&amp;binary=false&amp;passiveMode=true&amp;readLock=rename&amp;delete=true&amp;moveFailed=.failed&amp;include=.*\.txt&amp;delay=1000&amp;localWorkDirectory=../../camel_temp/&amp;username=username&amp;password=password&amp;maxMessagesPerPoll=100&amp;consumer.bridgeErrorHandler=true";
>  />
>       <!-- Routes -->
>       <route id="ReceiveFromFTP">
>               <from ref="FTPSource" />
>               <threads poolSize="1" maxPoolSize="1">
>                       <split streaming="true" parallelProcessing="true" 
> executorServiceRef="receiveFTP-splitter-profile">
>                               <tokenize token="\r\n"/>
>                               <to ref="FileOutput"/>
>                       </split>
>               </threads>
>       </route>
> </camelContext>
> {noformat} 
> The FTP location contains a file with several lines, I'm trying to split it, 
> and in the output location I have one file with the following content:
> {noformat}-rw-r--r-- 1 ftp ftp            141 Apr 02 08:04 
> FTP_ftpTest.txt_20130402081001301.txt{noformat}
> Looks like the Split component doesn't take the payload of the received file. 
> Even more, adding <convertBodyTo type="java.lang.String"/> before splitting 
> resolves the problem. But I assume this is not expected behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to