camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis S <dsoukhoros...@yahoo.com>
Subject Trouble with split/tokenize on linux
Date Sun, 28 Oct 2012 20:53:57 GMT
Hi All,

I have the following Camel route:

		<route id="processFile">
			<from uri="direct:csv"/>

        	        <onException>
            	                 <exception>java.lang.Exception</exception>
            	                 <handled>
                	               <constant>true</constant>
            	                 </handled>
            	                 <bean ref="myFileProcessor"
method="processError" />
        	        </onException>

			<split streaming="true">
				<tokenize token="\n"/>
				<unmarshal>
		    			<csv /> 
		    		</unmarshal>
				<process ref="myFileProcessor"/>
			</split>
		</route>

The files I'm processing aree huge, so I use streaming. I split files line
by line and then unmarshal them with csv parser. Everything works fine on
windows. But on linux it does not work for some reason. In the processError
method I receive lines which were not split correctly and can't be parsed
correcly by CSVParser as a result: 

"5701","FX S

the real line is:

"5701","FX SETT","286421","schmwe - Prev E10m/1yr increased to E150m/3mths,
E10m/1yr","EUR","3","S"

Looks like the file wasn't split by lines properly. Please advise which
token should I use to split files properly on linux platform?

Thanks, Denis.



--
View this message in context: http://camel.465427.n5.nabble.com/Trouble-with-split-tokenize-on-linux-tp5721677.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message