spring-batch-extensions icon indicating copy to clipboard operation
spring-batch-extensions copied to clipboard

BeanWrapperRowMapper throws BinderException on trying to read basic String files.

Open prateekchachra opened this issue 8 years ago • 1 comments

From a DataBinder binder, say I were to register a custom editor by calling:

binder.registerCustomEditor(String.class, new StringTrimmerEditor(true))

It tried to read this particular row as a Long; hence an IllegalArgumentException leading to the aforementioned BinderException.

prateekchachra avatar Oct 26 '16 04:10 prateekchachra

@prateekchachra Could you please add more details here? I am not sure but do check the value that you are getting from the file. Excel store values in floating point, may be that was the issue here as well. I ran into an issue where i am reading a value in Integer but the POI return me 1 as 1.0 and i am getting the binder exception or something like that. For that i used the Dataformatter by changing the POISHEET class to fix that.

waasikhaan avatar Dec 18 '16 18:12 waasikhaan