org.springframework.retry.RetryException: Non-skippable exception in recoverer while processing; nested exception is org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session
This was the one that worked for me. Make sure to create a new object instead of reusing and old one and setting new values into it:
records.setJob(feedJob); records.setProcessedRecords(seenFeedProducts.size()); feedJobRecordsDAO.save(records);
vs.
records = new FeedJobRecords(); records.setJob(feedJob); records.setProcessedRecords(seenFeedProducts.size());
feedJobRecordsDAO.save(records);