Hello Russ,

I'm afraid, there is no undocumented pattern to remove whitespaces.
I think we have to extend the
'org.apache.camel.dataformat.bindy.annotation.DataField' for this
requirement. Feel free to raise a JIRA issue for this:
https://issues.apache.org/activemq/browse/CAMEL

And to quote Claus, we love contributions... :-)

Regards,
Christian

On Tue, Jun 8, 2010 at 4:15 PM, Pitre, Russell <rpi...@shawmut.com> wrote:

> I'm using Bindy for processing CSV files and running into a situation
> where one of my Integer fields has whitespace in that position in the
> CSV file.  Is there any way to get pass this error?  Is there an
> undocumented pattern to remove whitespace?
>
>
>
>
>
> 08:52:52 DEBUG [org.apache.camel.dataformat.bindy.BindyCsvFactory] Pos :
> 1, Data : GLT, Field type : class java.lang.String
>
> 08:52:52 DEBUG [org.apache.camel.dataformat.bindy.BindyCsvFactory] Pos :
> 2, Data : 1-00-00-12500            , Field type : class java.lang.String
>
> 08:52:52 DEBUG [org.apache.camel.dataformat.bindy.BindyCsvFactory] Pos :
> 3, Data : 05/30/2010, Field type : class java.util.Date
>
> 08:52:53 DEBUG [org.apache.camel.dataformat.bindy.BindyCsvFactory] Pos :
> 4, Data :   , Field type : class java.lang.Integer
>
> 08:52:53 DEBUG [org.apache.camel.processor.DefaultErrorHandler] Failed
> delivery for exchangeId: 9b099be4-b8c6-49b2-acd4-a71cf12dd614. On
> delivery attempt: 0 caught: java.lang.IllegalArgumentException: String
> provided does not fit the Integer pattern defined or is not parseable,
> position : 4, line : 1
>
> 08:52:53 ERROR [org.apache.camel.processor.DefaultErrorHandler] Failed
> delivery for exchangeId: 9b099be4-b8c6-49b2-acd4-a71cf12dd614. Exhausted
> after delivery attempt: 1 caught: java.lang.IllegalArgumentException:
> String provided does not fit the Integer pattern defined or is not
> parseable, position : 4, line : 1
>
> java.lang.IllegalArgumentException: String provided does not fit the
> Integer pattern defined or is not parseable, position : 4, line : 1
>
>      at
> org.apache.camel.dataformat.bindy.BindyCsvFactory.bind(BindyCsvFactory.j
> ava:194)
>
>      at
> org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.unmarshal(Bindy
> CsvDataFormat.java:153)
>
>      at
> org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor
> .java:51)
>
>
>
>
>
>
>
> -Russ
>
>
  • Bindy Pitre, Russell
    • Re: Bindy Christian Müller

Reply via email to