Hi All,
am currently getting the following exception:
Am currently using a taskexcutor in my codes with a value set to 5 processing a flat file with 22000 lines . Am wondering if this could be a threading issue ?Code:Caused by: com.project.batch.exception.AppException: Invalid property 'vatStatus' of bean class [com..batch.value.input.InvoiceAll]: Duplicate match with distance <= 5 found for this property in input keys: [vatStatus, vatExemptionReason, invoiceTotalAmountSign, currency, vatNumber, countryInvoice, extractDate, endInvAllFiller, legacyInvoiceKey, extractTime, systemId, invoiceTotal, invoiceNumber, invoiceIssueDate, recordType]. (Consider reducing the distance limit or changing the input key names to get a closer match.) LINE NUMBER: 7 LINE: INV-ALL2011012814281314HHRU 20000025535404185677 VAT 201101240000006896908 RUBR
The exception seems to be coming from class org.springframework.batch.item.file.mapping.BeanWr apperFieldSetMapper at the following line:
I already have a setter for vatStatus on the object that I'd like to map the line to.Code:if (name != null) { if (matches.containsValue(name)) { throw new NotWritablePropertyException( cls, name, "Duplicate match with distance <= " + distanceLimit + " found for this property in input keys: " + keys + ". (Consider reducing the distance limit or changing the input key names to get a closer match.)"); } matches.put(key, name); switchPropertyNames(properties, key, name); } }
A fixed length tokenizer is also being used:
Do you have any ideas what could be causing this ?Code:<bean id="invoiceAllTokenizer" class="org.springframework.batch.item.file.transform.FixedLengthTokenizer"> <property name="names" value="systemId,recordType,extractDate,extractTime,legacyInvoiceKey,invoiceNumber,vatNumber,vatStatus,vatExemptionReason,invoiceIssueDate,invoiceTotal,invoiceTotalAmountSign,currency,countryInvoice,endInvAllFiller" /> <property name="columns" value="1-2,3-9,10-17,18-25,26-41,42-49,50-65,66-68,69-78,79-86,87-99,100-100,101-103,104-106,107-120" /> </bean>
thank you,
javed


Reply With Quote