Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6557C117A2 for ; Wed, 21 May 2014 07:07:47 +0000 (UTC) Received: (qmail 55866 invoked by uid 500); 21 May 2014 07:07:47 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 55820 invoked by uid 500); 21 May 2014 07:07:47 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 55812 invoked by uid 99); 21 May 2014 07:07:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 07:07:47 +0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [212.227.126.187] (HELO mout.kundenserver.de) (212.227.126.187) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 07:07:42 +0000 Received: from winxedgeeu03.exchange.xchg (winxedgeeu03.schlund.de [172.23.1.13]) by mrelayeu.kundenserver.de (node=mreue003) with ESMTP (Nemesis) id 0M944P-1WbEVJ0sgf-00CPxT; Wed, 21 May 2014 09:07:20 +0200 Received: from winxhubeu03.exchange.xchg (172.23.1.75) by winxedgeeu03.exchange.xchg (172.23.1.13) with Microsoft SMTP Server (TLS) id 8.3.279.5; Wed, 21 May 2014 09:06:29 +0200 Received: from winxbede40.exchange.xchg ([172.23.1.204]) by winxhubeu03.exchange.xchg ([172.23.1.75]) with mapi; Wed, 21 May 2014 09:04:05 +0200 From: "Walzer, Thomas" To: "users@camel.apache.org" Date: Wed, 21 May 2014 09:04:05 +0200 Subject: Re: Handle more than one csv file with two different date format Thread-Topic: Handle more than one csv file with two different date format Thread-Index: Ac90wtnsp6Ty1XhMQPaZxQ/2RoAMxg== Message-ID: <6C6F889A-5EA8-4551-B22D-6C16564ADF5A@integratix.net> References: <1400500479533-5751286.post@n5.nabble.com> In-Reply-To: <1400500479533-5751286.post@n5.nabble.com> Accept-Language: de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE x-provags-id: V02::AhA2rYb3qMoUOfynFyhslx32+AosiQFsO/8TdZhvVUd4u vcri/jeqLNT6P4gqjpLENDVhGay2tA2maOjEwa9M8I8DF57O9x MVWpFdz4WaskT39gm9DNWlPYvlS5lqSYfZ+1SPbs3FCQmQy7v8 bY2MIF/Kj3SC97hKAW8xP/NxpOseA2CzD+vBabfvbYwb6xj Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org I know it=B4s a different avenue: but you could try BeanIO. Should be doable. Cheers, Thomas. Am 19.05.2014 um 13:54 schrieb sergarci : > Hi there. >=20 > I'm currently working with Camel to parse some CSV files to java class us= ing > bindy and camel-spring. >=20 > For every different file I need a separate route, because each file defin= es > a different model class. >=20 > The think is that, when I have two different format to parse Date from cs= v > to java class I have an error: >=20 > java.lang.IllegalArgumentException: Parsing error detected for field defi= ned > at the position: ... >=20 > But when I runt each route separated it runs well. >=20 > I have defined the unmarshal like this: > > > > >=20 > > > > >=20 > And java class are like this: > @CsvRecord(separator =3D ",") > Class1{ >=20 > @DataField(pos =3D 5, pattern =3D "ddMMyyyy") > private Date theDate; > ... > @CsvRecord(separator =3D ",", skipFirstLine =3D true) > Class2{ >=20 > @DataField(pos =3D 2, pattern =3D "yyyy-MM-dd HH:mm:ss.SSS") > private Date theDate; > ... >=20 > Is there a known bug, how can I solve this issue? >=20 > Thank! >=20 >=20 >=20 > -- > View this message in context: http://camel.465427.n5.nabble.com/Handle-mo= re-than-one-csv-file-with-two-different-date-format-tp5751286.html > Sent from the Camel - Users mailing list archive at Nabble.com.