I am using univocity-parser library for this
class Person{
@Parsed(index=1)
String name;
@Parsed(index=2)
String age;
Address address;
}
class Address{
@Parsed(index=3)
String street;
String city;
}
BeanListProcessor rowProcessor = new BeanListProcessor(Person.class);
List beans = rowProcessor.getBeans();
Exception while mapping the csv columns to POJO class : com.univocity.parsers.common.DataProcessingException: Unable to set value to address field
Is there any other way to do it