camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <ch0...@gmail.com>
Subject Re: Camel-bindy Fixed Length Record Unmarshalling gives error
Date Fri, 28 Feb 2014 07:13:55 GMT
Hi,

Do you have a use case that we can use to reproduce the issue and fix the
problem ?

Regards,



On Thu, Feb 27, 2014 at 5:48 PM, sagarsoni <soni00106@gmail.com> wrote:

> [ thread #2 - JmsConsumer[File]] DefaultErrorHandler            ERROR
> Failed
> delivery for (MessageId:
> queue_File_ID_L-156037291-55755-1393511224324-1_3_1_1_1 on ExchangeId:
> ID-L-156037291-55751-1393511222786-0-3). Exhausted after delivery attempt:
> 1
> caught: java.lang.IllegalArgumentException: Size of the record: 629 is not
> equal to the value provided in the model: 627
>     at
>
> org.apache.camel.dataformat.bindy.fixed.BindyFixedLengthDataFormat.unmarshal(BindyFixedLengthDataFormat.java:137)
>     at
>
> org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:57)
>     at
>
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>     at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>     at
>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>
> My camel Route
>
> <route>
> <from uri="activemq:queue:File"/>
> <split>
> <tokenize token="\n" group="10"/>
> <unmarshal>
> <bindy type="Fixed" classType="com.model.Claim"/>
> </unmarshal>
> <bean ref="example" method="insertFileListItems"/>
> </split>
> </route>
>
> my bean class
>
> @FixedLengthRecord(length=627)
> public class Claim implements Serializable {
> ... setter getter
> }
>
> my data file
>
>
> 0000000000001010101X                           CARLOS JAVIER
> BARQUERO SANZ                                   AV LISBOA 1 4 D
> CACERES     10004                                           CACERES
> 198501180608316300              M       Sr.    14000000  20100505 A
> 20100506                      00000107000000007708200000000001800000
> 20150505  20111111360000000012500142  20400505400    714  20111102
>  20111110
> 20111111  20111111  20111111                                   THEFT
> GOODS THEFT                         CONTENT CAPITAL
> 0000000000001010101X                                 TATIANA
> GONZALEZ IBAÑEZ                                    CL DE BOIRO 64
> CORDOBA     14014                                           CORDOBA
> 195707290605544400              F      Sra.    14000000  20100505 A
> 20100506                      00000110000000009284640000000002100000
> 20150505  20111111300000000007042576  20350505400    712  20111110
>  20111110
> 20111111  20111111  20111111                                   WATER
> WATER                        BUILDING CAPITAL
> 0000000000001010101X                                 TATIANA
> GONZALEZ IBAÑEZ                                    CL DE BOIRO 64
> CORDOBA     14014                                           CORDOBA
> 195707290605544400              F      Sra.    14000000  20100505 A
> 20100506                      00000110000000009284640000000002100000
> 20150505  20111111300000000007042576  20350505400    712  20111110
>  20111110
> 20111111  20111111  20111111                              ESTHETICAL
> WATER                        BUILDING CAPITAL
>
> Note ::
>
> My Data file length is 627.
>
> I have checked it properly.
>
> Now the problem is when i am trying to run this project from
> fuse-ide(eclipse based ide) using right-click on camel-context.xml and run
> it as Local-camel-context it is working fine.
>
> but when i am trying to run the same project using mvn camel:run or deploy
> it on server it is giving this 629 length is not matching error.
>
> i think there is some problem of locale / CRLF / etc...
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-bindy-Fixed-Length-Record-Unmarshalling-gives-error-tp5748042.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message