fyzhou / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 0 forks source link

UnexpectedRecord: End of stream reached, expected record 'trailer': null for "fixedlength" format #121

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
unable to unmarshal the attached data file with the attached mapping xml.  

What is the expected output? What do you see instead?
expecting file being unmashalled. 
Error is: UnexpectedRecord: End of stream reached, expected record 'trailer': 
null

What version of BeanIO are you using? What JDK version?
BeanIO  2.0.7
JDK jdk1.7.0_25

Please provide any additional information below.
I changed the mapping file line below from maxOccurs = "unbounded" to 
maxOccurs = "4" , problem went away. But that is not the right way to do it.
<record name="record" class="com.amig.bti.achprocessor.dto.beanio.LockBoxData" 
minOccurs="0" maxOccurs="unbounded">

Original issue reported on code.google.com by tianhan...@gmail.com on 19 Sep 2014 at 5:32

Attachments:

GoogleCodeExporter commented 9 years ago
This is expected behavior.  You need to assign at least one record identifying 
field (i.e. where rid="true") in the "record" record, and probably the 
"trailer" record too.

Original comment by kevin.s...@gmail.com on 20 Sep 2014 at 7:23