Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 199AB200C54 for ; Tue, 28 Mar 2017 10:34:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 18334160BA1; Tue, 28 Mar 2017 08:34:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3F1F3160B89 for ; Tue, 28 Mar 2017 10:34:47 +0200 (CEST) Received: (qmail 58953 invoked by uid 500); 28 Mar 2017 08:34:46 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 58798 invoked by uid 99); 28 Mar 2017 08:34:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2017 08:34:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C5BE9C2767 for ; Tue, 28 Mar 2017 08:34:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id IgtQ-2ScmiEw for ; Tue, 28 Mar 2017 08:34:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id B11E85FC4A for ; Tue, 28 Mar 2017 08:34:44 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7C218E0D3A for ; Tue, 28 Mar 2017 08:34:43 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5581425D08 for ; Tue, 28 Mar 2017 08:34:42 +0000 (UTC) Date: Tue, 28 Mar 2017 08:34:42 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-11065) Cannot parse CSV record starting with separator character MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 28 Mar 2017 08:34:48 -0000 [ https://issues.apache.org/jira/browse/CAMEL-11065?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D159= 44767#comment-15944767 ]=20 Claus Ibsen commented on CAMEL-11065: ------------------------------------- Contributions is welcome to try to fix this > Cannot parse CSV record starting with separator character > --------------------------------------------------------- > > Key: CAMEL-11065 > URL: https://issues.apache.org/jira/browse/CAMEL-11065 > Project: Camel > Issue Type: Bug > Components: camel-bindy > Affects Versions: 2.18.3 > Reporter: Tom=C3=A1=C5=A1 Livora > > Camel Bindy is not able to parse a CSV file where one value starts with a= separator character. Example of such a record: > {code} > 'text1',',text2',3 > {code} > And the Java class used: > {code:title=3DBar.java|borderStyle=3Dsolid} > @CsvRecord(separator =3D ",", quote =3D "'") > public class Record { > @DataField(pos =3D 1) > private String text1; > @DataField(pos =3D 2) > private String text2; > @DataField(pos =3D 3, pattern =3D "########.##") > private BigDecimal number; > } > {code} > You will get an exception like this: > {code} > java.lang.IllegalArgumentException: Parsing error detected for field defi= ned at the position: 3, line: 1 > =09at org.apache.camel.dataformat.bindy.BindyCsvFactory.bind(BindyCsvFact= ory.java:213) > =09at org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.unmarshal(= BindyCsvDataFormat.java:173) > =09at org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProc= essor.java:69) > =09at org.apache.camel.management.InstrumentationProcessor.process(Instru= mentationProcessor.java:77) > =09at org.apache.camel.processor.RedeliveryErrorHandler.process(Redeliver= yErrorHandler.java:542) > =09at org.apache.camel.processor.CamelInternalProcessor.process(CamelInte= rnalProcessor.java:197) > =09at org.apache.camel.processor.Pipeline.process(Pipeline.java:120) > =09at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > =09at org.apache.camel.processor.CamelInternalProcessor.process(CamelInte= rnalProcessor.java:197) > =09at org.apache.camel.component.direct.DirectProducer.process(DirectProd= ucer.java:62) > =09at org.apache.camel.processor.SendProcessor.process(SendProcessor.java= :145) > =09at org.apache.camel.management.InstrumentationProcessor.process(Instru= mentationProcessor.java:77) > =09at org.apache.camel.processor.RedeliveryErrorHandler.process(Redeliver= yErrorHandler.java:542) > =09at org.apache.camel.processor.CamelInternalProcessor.process(CamelInte= rnalProcessor.java:197) > =09at org.apache.camel.processor.Pipeline.process(Pipeline.java:120) > =09at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > =09at org.apache.camel.processor.RedeliveryErrorHandler.process(Redeliver= yErrorHandler.java:542) > =09at org.apache.camel.processor.CamelInternalProcessor.process(CamelInte= rnalProcessor.java:197) > =09at org.apache.camel.processor.MulticastProcessor.doProcessSequential(M= ulticastProcessor.java:681) > =09at org.apache.camel.processor.MulticastProcessor.doProcessSequential(M= ulticastProcessor.java:609) > =09at org.apache.camel.processor.MulticastProcessor.process(MulticastProc= essor.java:238) > =09at org.apache.camel.processor.Splitter.process(Splitter.java:108) > =09at org.apache.camel.management.InstrumentationProcessor.process(Instru= mentationProcessor.java:77) > =09at org.apache.camel.processor.RedeliveryErrorHandler.process(Redeliver= yErrorHandler.java:542) > =09at org.apache.camel.processor.CamelInternalProcessor.process(CamelInte= rnalProcessor.java:197) > =09at org.apache.camel.processor.CamelInternalProcessor.process(CamelInte= rnalProcessor.java:197) > =09at org.apache.camel.component.file.GenericFileConsumer.processExchange= (GenericFileConsumer.java:460) > =09at org.apache.camel.component.file.GenericFileConsumer.processBatch(Ge= nericFileConsumer.java:227) > =09at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFil= eConsumer.java:191) > =09at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollCons= umer.java:175) > =09at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsum= er.java:102) > =09at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:= 511) > =09at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > =09at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTas= k.access$301(ScheduledThreadPoolExecutor.java:180) > =09at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTas= k.run(ScheduledThreadPoolExecutor.java:294) > =09at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto= r.java:1142) > =09at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut= or.java:617) > =09at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.NumberFormatException: null > =09at java.math.BigDecimal.(BigDecimal.java:494) > =09at java.math.BigDecimal.(BigDecimal.java:383) > =09at java.math.BigDecimal.(BigDecimal.java:806) > =09at org.apache.camel.dataformat.bindy.format.factories.BigDecimalPatter= nFormatFactory$BigDecimalPatternFormat.parse(BigDecimalPatternFormatFactory= .java:66) > =09at org.apache.camel.dataformat.bindy.format.factories.BigDecimalPatter= nFormatFactory$BigDecimalPatternFormat.parse(BigDecimalPatternFormatFactory= .java:49) > =09at org.apache.camel.dataformat.bindy.BindyCsvFactory.bind(BindyCsvFact= ory.java:209) > =09... 37 common frames omitted > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)