camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <ganeshkumar.kanaga...@barclays.com>
Subject RE: Bindy Date Pattern Error
Date Thu, 11 Jul 2013 16:28:14 GMT
Hi,
We are using camel version 2.11

Our data format is in the format of YYMMDD , Unmarshalling is failing if we use java.sql.date
but works with java.util.date.

But java.util.date is not compliant with sql server database insert, so we need to add some
conversion logic in the get method of the Model.

Thanks
Ganesh

-----Original Message-----
From: Christian Müller [mailto:christian.mueller@gmail.com] 
Sent: Tuesday, July 09, 2013 4:32 PM
To: users@camel.apache.org
Subject: Re: Bindy Date Pattern Error

How dos your date looks like?
Which version of Camel do you use?
I added an unit test to 2.12-SNAPSHOT [1] which show does it works (at least with this version).

[1]
https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/date/BindyDatePatternCsvUnmarshallTest.java;h=71184cef4acce98a3bfe36c32efd574b5f7d00f1;hb=HEAD

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Tue, Jul 9, 2013 at 8:31 PM, <ganeshkumar.kanagavel@barclays.com> wrote:

> Hi,
> Can you please advise regarding Date Pattern exception in Bindy.
>
> We are using Bindy to marshal, We have a attribute with data type as DATE.
>
> We are getting the below exception during the parsing.
>
> java.lang.IllegalArgumentException: Can not find a suitable formatter 
> for the type: java.sql.Date Annotation model snippet is below.
>
> @DataField(pos=41, length=10,pattern="MM-dd-yyyy")
>       private Date settlement_date;
> Thanks
> Ganesh
>
>
>
>
>
> _______________________________________________
>
> This message is for information purposes only, it is not a 
> recommendation, advice, offer or solicitation to buy or sell a product 
> or service nor an official confirmation of any transaction. It is 
> directed at persons who are professionals and is not intended for 
> retail customer use. Intended for recipient only. This message is subject to the terms
at:
> www.barclays.com/emaildisclaimer.
>
> For important disclosures, please see:
> www.barclays.com/salesandtradingdisclaimer regarding market commentary 
> from Barclays Sales and/or Trading, who are active market 
> participants; and in respect of Barclays Research, including 
> disclosures relating to specific issuers, please see http://publicresearch.barclays.com.
>
> _______________________________________________
>
_______________________________________________

This message is for information purposes only, it is not a recommendation, advice, offer or
solicitation to buy or sell a product or service nor an official confirmation of any transaction.
It is directed at persons who are professionals and is not intended for retail customer use.
Intended for recipient only. This message is subject to the terms at: www.barclays.com/emaildisclaimer.

For important disclosures, please see: www.barclays.com/salesandtradingdisclaimer regarding
market commentary from Barclays Sales and/or Trading, who are active market participants;
and in respect of Barclays Research, including disclosures relating to specific issuers, please
see http://publicresearch.barclays.com.

_______________________________________________

Mime
View raw message