I am reading an .xlsx file which contain columns like Name, Id , Date(11/28/2017) and few more. I created one .xml file "cancellation.xml" to map my excel cells. After that I am reading the excel file using these lines of codes.
Resource configFile = new FileSystemResource("resource" + File.separator + "excel" + File.separator + "template" + File.separator + "cancellation.xml");
BeanUtilsBean.getInstance().getConvertUtils().register(false, false, 0);
final XLSReader xlsReader = ReaderBuilder.buildFromXML(configFile.getFile());
final List<Transaction> transactionList = new ArrayList<>();
final Map<String, Object> transactionMap = new HashMap<>();
transactionMap.put("transactionList", transactionList);
xlsReader.read(multipartFile.getInputStream(), transactionMap);
Everything works fine when I hit the API for the first time and it reads all the columns successfully. But when I hit the API after the first hit it fails to read the columns of excel showing by these error.
2018-03-19 14:05:13.976 WARN 7312 --- [nio-8085-exec-4] o.a.c.b.converters.DateConverter : DateConverter does not support default String to 'Date' conversion. 2018-03-19 14:05:13.976 WARN 7312 --- [nio-8085-exec-4] o.a.c.b.converters.DateConverter : (N.B. Re-configure Converter or use alternative implementation)