You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bob Jolliffe (JIRA)" <ji...@apache.org> on 2013/08/10 12:00:48 UTC

[jira] [Commented] (CAMEL-6624) csv component doen't accept tab character as delimiter

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

Bob Jolliffe commented on CAMEL-6624:
-------------------------------------

The exception thrown is:
Caused by: java.lang.IllegalArgumentException: String must have exactly a length of 1: "\t"
	at org.apache.camel.converter.ObjectConverter.toChar(ObjectConverter.java:101)

This ObjectConverter method does behave correctly when passed a string of "\t" so it seems the string escape characters are being protected prior to being passed for conversion.  Also affects flatpack component .. the same object converter method is being used. 
                
> csv component doen't accept tab character as delimiter 
> -------------------------------------------------------
>
>                 Key: CAMEL-6624
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6624
>             Project: Camel
>          Issue Type: Bug
>          Components: extra
>    Affects Versions: 2.11.1
>         Environment: java version "1.7.0_25"
> Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
> 64 bit Ubuntu linux 12.04
>            Reporter: Bob Jolliffe
>              Labels: easyfix
>
> I have a route like the following:
>         <route>
>             <from uri="file://tracnet?charset=ISO-8859-1"/>
>             <c:split streaming="true">
>                 <c:tokenize token="\n"/>
>                 <unmarshal>
>                     <csv delimiter="\t"/>
>                 </unmarshal>
>                 <to uri="log:org.hisp.dhix?showAll=true"/>
>             </c:split>
>         </route>
> My camel context complains that the delimiter should be of length 1 when I try to load this.  It seems it sees my escaped tab as 2 characters?

--
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