You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by fclose <fr...@closebase.com> on 2013/09/20 16:16:37 UTC

Bindy infinite loop

I have a route that looks like this

<camel:route id="myImportRoute" errorHandlerRef="myImportErrorHandler">
    <camel:from uri="file:/data/import/in/?move=/data/import/processed"/>
    <camel:split streaming="true">
        <camel:tokenize token="\n" />
        <camel:unmarshal ref="bindyImportformat"/>
		<camel:to uri="bean:importLineHandler?method=handleImport"/>	
    </camel:split>
</camel:route>

<bean id="bindyWinnerformat"
class="org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat">
	<constructor-arg value="myBean" />
</bean>


if the route has to process a file that contains an empty line at the end 
(I suppose that if I have an empty line in the middle of the file, the
problem will be the same) then the process restarts from the beginning of
the file and so on ... infinite loop.

The problem is only happening on Linux, I could not reproduce it on windows.

Is it due to the token separator \n ? 
What could be done to put safe guards and avoid that something like this
happen even if have empty lines in my file ?




--
View this message in context: http://camel.465427.n5.nabble.com/Bindy-infinite-loop-tp5739879.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Bindy infinite loop

Posted by fclose <fr...@closebase.com>.
I had the problem with 2.10.3 and did not test with newer version.



--
View this message in context: http://camel.465427.n5.nabble.com/Bindy-infinite-loop-tp5739879p5740122.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Bindy infinite loop

Posted by Christian Posta <ch...@gmail.com>.
What version of camel does this affect?


On Fri, Sep 20, 2013 at 7:16 AM, fclose <fr...@closebase.com> wrote:

> I have a route that looks like this
>
> <camel:route id="myImportRoute" errorHandlerRef="myImportErrorHandler">
>     <camel:from uri="file:/data/import/in/?move=/data/import/processed"/>
>     <camel:split streaming="true">
>         <camel:tokenize token="\n" />
>         <camel:unmarshal ref="bindyImportformat"/>
>                 <camel:to
> uri="bean:importLineHandler?method=handleImport"/>
>     </camel:split>
> </camel:route>
>
> <bean id="bindyWinnerformat"
> class="org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat">
>         <constructor-arg value="myBean" />
> </bean>
>
>
> if the route has to process a file that contains an empty line at the end
> (I suppose that if I have an empty line in the middle of the file, the
> problem will be the same) then the process restarts from the beginning of
> the file and so on ... infinite loop.
>
> The problem is only happening on Linux, I could not reproduce it on
> windows.
>
> Is it due to the token separator \n ?
> What could be done to put safe guards and avoid that something like this
> happen even if have empty lines in my file ?
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Bindy-infinite-loop-tp5739879.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta