java – FlatFileItemReader using FixedLengthTokenizer not working

java – FlatFileItemReader using FixedLengthTokenizer not working

in the config spring bach file : spring-batch-context.xml :
I changed this :

<property name=fixedLengthTokenizer>
                   <bean class=org.springframework.batch.item.file.transform.FixedLengthTokenizer>
                      <property name=names value=fisrtName,id, phone,lastName ,streetName,age,city, date_of_birth,quantity,sin ,code></property>
                      <property name=columns value=1-4,6-9,10-13,15-18,19-22,23-26,27-31,33-40,45-47,48-53,55-55></property>
                   </bean>
                </property>

to :

<property name=lineTokenizer>
                   <bean class=org.springframework.batch.item.file.transform.FixedLengthTokenizer>
                      <property name=names value=fisrtName,id, phone,lastName ,streetName,age,city, date_of_birth,quantity,sin ,code></property>
                      <property name=columns value=1-4,6-9,10-13,15-18,19-22,23-26,27-31,33-40,45-47,48-53,55-55></property>
                   </bean>
                </property>

its worked fine.

java – FlatFileItemReader using FixedLengthTokenizer not working

Leave a Reply

Your email address will not be published. Required fields are marked *