[Solved] java.util.ArrayList cannot be cast to an object [closed]


Please look into stacktrace to see exact line where the problem occurs.
First line of stacktrace should point you exactly to root cause. You may update sample code with that line, or update question with relevant part of stacktrace.
Somebody is just casting ObjectXYZ to ArrayList, it seems.

Also, do not return null from method that is returning list. return Collections.emptyList() instead.

RetryException – is this org.springframework.batch.retry.RetryException ?
No need to declare method to throw it, it is RuntimeException.

solved java.util.ArrayList cannot be cast to an object [closed]