Hi. First congrats for the great lib.
I'm having some kind of grouping issue. There are some similar errors around, but i've read all of them, with no success on my problem.
My xml mapping file is something like this:
<stream name="bank" format="fixedlength" >
<parser>
<property name="recordTerminator" value="\r\n" />
</parser>
<group name="file" order="1" class="com.bank.BankFile">
<record name="header" order="1" minOccurs="1" maxOccurs="1" class="bank.BankHeader" />
<record name="batches" order="2" minOccurs="1" maxOccurs="unbounded" collection="list" class="bank.BankTransaction"/>
<record name="trailer" order="3" minOccurs="1" maxOccurs="1" class="bank.BankTrailer"/>
</group>
</stream>
And my class structure looks like this:
public class BankFile {
private BankHeader header;
private List<BankTransaction> batches = new ArrayList<BankTransaction>();
private BankTrailer trailer;
}
Each one of this classes (except for BankFile) are annotated with its proper fixed length annotations.
But when I try to run, it gives me the following error:
org.beanio.BeanIOConfigurationException: Invalid record 'batches', in group 'file', in stream 'bank': Repeating segments without any child field component must have minOccurs=maxOccurs
at org.beanio.internal.compiler.ProcessorSupport.process(ProcessorSupport.java:93)
I think there is something wrong on the way i'm using this bankTransactions.. something on the record using collections.
Because I have other mapping files very similar and working pretty well. This is the only difference.
Any help? Thx!