for pojo's or entity simply shuffle the lines and try to scan again, it wont see as a duplicate lines. I too faced same issue with entity class of DB, I simply shuffled the lines. it resolved the issue