camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How-to specify tab delimiter for flatpack
Date Wed, 23 Feb 2011 16:47:58 GMT
Hi

Its fact already reported and fixed. See
https://issues.apache.org/jira/browse/CAMEL-3045

Also you should always details what version of Camel you are using!
And try upgrading to never version to see if its fixed.

So in your case you need Camel 2.5 or better.


On Wed, Feb 23, 2011 at 5:39 PM, prossman
<philipp.rossmanith@t-systems.es> wrote:
>
> Hi,
>
> I'm receiving a tab-delimited file which I intend to parse with
> camel-flatpack. My <to> URI is:
> <to
>        uri="flatpack:delim:flatpack/IMPAUT_IMPERR.fpmap.xml?delimiter='\t'"
> />
>
> I'm trying to specify the tab using the delimiter option, but I get the
> following error:
>
> org.apache.camel.RuntimeCamelException:
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> route17 at: >>>
> To[flatpack:delim:flatpack/IMPAUT_IMPERR.fpmap.xml?delimiter='\t'] <<< in
> route: Route[[From[file://c:/temp/tsisb/rvs-in?include=IMPAUT_IMPER...
> because of Failed to resolve endpoint:
> flatpack://delim:flatpack/IMPAUT_IMPERR.fpmap.xml?delimiter=%27%5Ct%27 due
> to: Could not find a suitable setter for property: delimiter as there isn't
> a setter method with same type: java.lang.String nor type conversion
> possible: No type converter available to convert from type: java.lang.String
> to the required type: char with value '\t'
>
> I tried different ways of specifying the delimiter:
> ?delimiter='\t'
> ?delimiter=\t
> ?delimiter='\u0009'
> ?delimiter=\u0009
>
> &#9; results in an illegal character. I checked the
> http://fusesource.com/docs/router/2.5/apidoc/org/apache/camel/component/flatpack/DelimitedEndpoint.html
> JavaDoc of the DelimitedEndpoint , and the setDelimiter method only accepts
> char as parameter.
>
> As parsing a tab-separated file seems to be a rather common use case, I'm
> wondering:
> Did anyone come across this?
> Is there a way to indicate in the component URI that \t is to be treated as
> char?
> Is there any other way how this can be solved?
>
> Thanks,
> Ciao, Philipp
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-specify-tab-delimiter-for-flatpack-tp3397320p3397320.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message