Closed WalsonRene closed 8 years ago
Please i realy need your help; I try the method readWithCsvListReader. but i have this errors
lineNo=2, rowNo=2, customerList=[ARA, ARIK AIR LIMITED, SA ;] Exception in thread "main" org.supercsv.exception.SuperCsvException: The number of columns to be processed (1) must match the number of CellProcessors (3): check that the number of CellProcessors you have defined matches the expected number of columns being read/written context={lineNo=3, rowNo=3, columnNo=1, rowSource=[RBB,"RABBIT-AIR AG"," ZURICH",SA ;]} at org.supercsv.util.Util.executeCellProcessors(Util.java:78) at org.supercsv.io.AbstractCsvReader.executeProcessors(AbstractCsvReader.java:203) at org.supercsv.io.CsvListReader.executeProcessors(CsvListReader.java:96) at org.supercsv.io.CsvListReader.read(CsvListReader.java:86) at com.snecma.csv.controller.v1.controller.Reading.readWithCsvListReader(Reading.java:107) at com.snecma.csv.controller.v1.main.Main.main(Main.java:12)
Someone can help me please ?
Hi @WalsonRene you are showing two different errors for the same code example?
How does the example work found at http://super-csv.github.io/super-csv/examples_reading.html ?
Hi @WalsonRene, do you still need a help with this?
Given that we haven't heard from @WalsonRene in 6 months now I'd move to close this ticket.
Hello!
I have a big problem that i cant resolve i search evrywhere but i can't found a solution.
my processors
my readWithCsvBeanReader
and my csv file 10 first line
CUSTOMER_CD,CUSTOMER_NAME,CFM_REPORTING_REGION_CD ARA,ARIK AIR LIMITED,SA
RBB,"RABBIT-AIR AG, ZURICH",SA
LUXF,LUXFLIGHT,SA
ISDA,ISD AVIA LTD,SA
KEAI,KEY AIR INC,INC
NMB,AIR NAMIBIA,SA
AVAI,AVAIR,INC
OPER,OPERADORA TURISTICA AURORA S.A.,INC
ALGA,ALG AERO-LEASING,INC
My problem is when i run
lineNo=2, rowNo=2, customer=IfsCustomerDataBean [CUSTOMER_CD=ARA, CUSTOMER_NAME=ARIK AIR LIMITED, CFM_REPORTING_REGION_CD=SA ;, LINE_NUMBER=1] Exception in thread "main" java.lang.IllegalArgumentException: the nameMapping array and the number of columns read should be the same size (nameMapping length = 3, columns = 1) at org.supercsv.io.CsvBeanReader.readIntoBean(CsvBeanReader.java:251) at org.supercsv.io.CsvBeanReader.read(CsvBeanReader.java:190) at com.snecma.csv.controller.v1.controller.Reading.readWithCsvBeanReader(Reading.java:86) at com.snecma.csv.controller.v1.main.Main.main(Main.java:12)